I’m going to Porto in May. So I tried every planning app I could find, and they all gave me the same lists, written for a visitor who isn’t me.
The things that really matter to me weren’t in any of them. Which cafés I loved in Sicily. Which museum in Vienna bored me. How much I like to fit into one day. None of it was written anywhere a program could read. It lived in my head and in my photo roll.
I also wanted to learn MCP and RAG properly, and the best way I know to learn something is to build a thing I’ll actually use. So the project became a planner that saves my trips, searches my own travel notes, and plans a day around what I like, with Claude as the interface.
I built the prototype over a weekend, in three parts. I’ll call them Day 1, 2 and 3 below, and each one adds a layer. And yes, by the end, it had decided I love taxis. We’ll get there.
There’s no web app yet. Claude Desktop is the whole interface. Everything else is one Python process plus two data stores on my laptop: SQLite for the trips and a local Chroma vector store for the notes.
Each day added one layer: the trip tools on Day 1, the notes search on Day 2, the profile and the planner prompt on Day 3.
All my personal data lives in one data/ folder that git ignores: the database, the notes, the vector store and the profile. One ignore rule covers all four, so none of my travel notes can end up in the repo by accident.
This prototype only runs on my laptop, so I used stdio, the simplest transport. Claude Desktop starts my server as a child process. Claude writes requests to the server’s stdin, and the server writes its answers to stdout. Each message is one line of JSON-RPC.
That has one big side effect: stdout belongs to the protocol, and only to the protocol. Anything else written there gets parsed as a message, fails, and breaks the connection. Even a single forgotten print() could do it. So I used Python’s logging module to send all logs to stderr. Claude Desktop saves them in a log file for each server (%APPDATA%\Claude\logs\mcp-server-travel-planner.log on Windows), and that file is where I did most of my debugging.
If you’re following along, this one will save you some confusion. Most MCP tutorials I found begin with from mcp.server.fastmcp import FastMCP. With the current SDK, that line fails right away with ModuleNotFoundError. Version 2.0, released in July 2026, renamed the class to MCPServer:
from mcp.server import MCPServermcp = MCPServer("travel-planner")
So if an example breaks on the very first line, check which SDK version it was written for, before you start doubting yourself. 🙃
Here’s a nice shortcut: the code I write anyway is also the contract Claude reads. I didn’t write a single schema by hand. The SDK reads my Python function and builds the tool from it. The function name becomes the tool name, the docstring becomes its description, and the type hints become a JSON Schema for the arguments.
@mcp.tool()def create_trip( destination: str, start_date: str, # YYYY-MM-DD end_date: str, travel_type: Literal["relaxed", "packed"] = "relaxed", budget: int | None = None, currency: str = "EUR",) -> dict: """Save a new trip and return it exactly as stored."""
For the travel type I used Literal. In the schema it becomes an enum, so Claude sees the two allowed values before it ever calls the tool. The default shows up in the schema too.
The decorator registers the tool as soon as the module is imported. That’s why the mcp object and all the tools sit at the top level of the file. Inside a function, they would only be registered if that function ran, and Claude might never see them.
These look like tiny details, but each one prevents a quiet bug.
This one changed how I think about errors. When a tool fails, Claude reads the error as the tool’s answer, and then decides what to do next. So I wrote my errors as next steps:
No trip with id 7. Run list_trips and find the correct trip_id.
The tool name in the message has to match the real tool exactly, or the hint sends Claude to a tool that doesn’t exist. Having no trips is a different case, and it isn’t an error at all. list_trips just returns [], because “no trips yet” is a valid answer.
Before connecting the server to Claude Desktop, I tested all three tools in the MCP Inspector (npx @modelcontextprotocol/inspector), including the not-found error.
At the end of Day 1, I created a packed Porto trip, with food and viewpoints as interests, just by writing a chat message. No form to fill in: I described the trip in normal words, and Claude turned it into a create_trip call with the right arguments. list_trips returned all my trips, sorted by start date. Claude could now save and read my trips. Next, it had to learn what I actually like.
This is the RAG part: find the notes that fit a question, then let Claude write the answer from them. First, though, the notes had to exist.
I wrote notes for three past trips. My first drafts were messy. They still had template placeholders like “Some Viewpoint” and “Café Example”, and some sections described three places at once.
The final format is one Markdown file per trip. The front matter describes the trip, and every place gets its own ## section with the same fixed fields (sample data):
---trip: Vienna 2025city: Viennacountry: Austriatravel_type: relaxed---## Café Lindenhoftype: cafecity: Viennaverdict: lovedrating: 5why: Quiet in the morning, good strudel.tip: Sit in the back room.
type and verdict use closed lists (loved, liked, disliked, hated for the verdict), so they can work as filters later.
The pipeline is simple: an ingest script reads the Markdown notes, splits them into chunks, embeds them and stores them in Chroma. It splits each file at the ## headings, so one chunk is one place. A chunk’s text is the heading plus its fields. Its metadata is the front matter, the source file and the section name. Three notes gave 14 chunks.
I rejected two other options:
Ingestion is its own script, and I run it whenever the notes change. The server only reads from the store and never re-chunks on startup.
Every time the ingest script runs, it has to recognize which chunk is which, so it updates the old ones instead of adding copies. That all depends on the ids.
Each chunk id is the file stem plus a slug of the heading, for example vienna-2025#cafe-lindenhof. Same note, same id, so upsert updates the chunk in place. The other options all break somewhere:
upsert never deletes, though. If I rename a heading, the old chunk stays behind, and the search can then cite a place that is no longer in my notes. So before each ingest run, a set difference finds those orphans:
existing = set(collection.get(include=[])["ids"])current = {chunk["id"] for chunk in chunks}orphans = sorted(existing - current)if orphans: collection.delete(ids=orphans)
There’s a trap hidden in that code. If chunks were ever empty, every stored id would count as an orphan, and the whole store would be wiped. So the raises an error when the notes folder is missing or has no .md files.
Two type problems came up as well. YAML turns an unquoted date into a Python date, but Chroma metadata only accepts str, int, float and bool. So a small converter turns dates into ISO strings, joins lists with commas and drops None.
The last surprise was invisible. Some editors save a byte order mark at the start of the file, and then the front matter is silently not found. Reading the files with encoding=”utf-8-sig” fixed it.
Finally, the real test. I asked Claude, “What did I love in Sicily?”
The results were notes from Vienna. 🤦🏻♀️
It took me a moment to see why. The country was only in the front matter, which Chroma stores as metadata. But only the chunk text goes through the embedding model. So for the vector search, my Sicily cafés were just cafés.
The fix was a Country: line in the text of every chunk, built once per file from the front matter. It took three tries. My first version wrote the literal text {country} into every chunk. A quick fix would have written None for notes without a country, and Python list syntax like [‘Italy’] when the country is a list (some trips cover more than one country). The final version joins lists with a comma and skips the line when the country is missing.
Next question: “What did I like in Vienna?” It returned every Vienna chunk, with L2 distances between 0.70 and 0.81 (lower means closer). There was no gap between what I liked and what I didn’t. The ## Overall chunk is the one section of a note that isn’t about a single place. It scored weakest of all, at 0.965, because its text named no place.
The embedding captures what a text is about much better than how I felt about it. A Vienna café I loved and a Vienna café I didn’t like end up almost in the same spot.
The answer was still right, because Claude read the verdict and rating lines in the results and sorted them itself. For the rebuild, “what did I like” becomes a metadata filter on verdict, and the vectors only handle the topic.
search_my_travel_memory returns a list of dicts with id, text, source, section, city and the distance rounded to three decimals. source and section are what Claude cites, so I can check where an answer came from. The docstring tells Claude when to use the tool, that a lower distance means a closer match, and to say so when nothing relevant comes back.
An empty store raises an error telling Claude that the ingest script needs to run. Why not just return an empty list? Because an empty list would read as “you have no relevant memories”, and Claude would answer as if that were true.
In Claude Desktop, Claude picked the number of results on its own (8). It also handled my typo “Sicly” without any help. 😁
So Claude could save my trips and search my memories. The last step was turning all of that into an actual plan.
MCP gives a server three ways to expose things. The difference is who decides when they get used:
data/profile.json holds my defaults, the things that rarely change: pace, when my day starts and ends, a fallback budget, food I like and avoid, interests, and things to skip. The server reads the file on every call, so my edits apply without a restart.
When a trip and the profile disagree, the trip wins. My profile says relaxed, the Porto trip says packed, and the plan came out packed.
In Claude Desktop, I pick plan_day from the prompt menu and fill in two arguments: trip_id and day. The server loads the trip through get_trip, reads the profile, and puts both into the prompt text. The memory search, on the other hand, stays a tool, so Claude decides what to look up while it plans, instead of me guessing in advance which notes matter. I checked that it really called search_my_travel_memory during planning.
The prompt also asks for a source tag on every reason, so I can see where each idea came from (sample output):
- Morning: a quiet café before sightseeing [memory: vienna-2025#cafe-lindenhof]- Lunch: grilled fish, skip the set menus [profile]- Evening: sunset from a viewpoint [general knowledge]
I ran the prompt twice: once for a day that turned out to fall outside the trip’s dates, and once for day 2. Both plans looked good at first glance. On a careful read, they had problems. These are the ones that stood out:
I wrote down every flaw I found in the plans. There were 11, and they all came from just four causes:
The third cause changed my plan the most. Checking a budget or a date is a job for code, not for a language model. Code does the same math the same way every time, while a model writes what a good answer would probably look like. So in the rebuild, code makes those decisions and Claude explains them.
For the fourth cause, I now separate two kinds of memory:
A trip memory only becomes a preference if it happens again on another trip, or if I say so myself.
The prototype is done, and it did its job: it showed me where things break. Now I’m rebuilding it properly, keeping the parts that held up, in this order:
Later articles will cover the evaluation set and the choice between pgvector and Qdrant.
The Porto trip is still in May. By then, I’d like to plan it with my own notes instead of other people’s lists, and without a taxi waiting for me on every corner! 😄
If you’ve built an MCP server or a RAG setup on personal data, which part gave you the most trouble?
My Travel Planner Decided I Love Taxis was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.