{"slug": "my-travel-planner-decided-i-love-taxis", "title": "My Travel Planner Decided I Love Taxis", "summary": "A developer built a weekend travel-planner prototype that runs entirely through Claude Desktop using the Model Context Protocol (MCP) and retrieval-augmented generation (RAG), storing trips in SQLite and personal travel notes in a local Chroma vector store. The build surfaced a breaking change in the MCP Python SDK: version 2.0, released in July 2026, renamed the FastMCP class to MCPServer, so tutorials starting with \"from mcp.server.fastmcp import FastMCP\" fail immediately with ModuleNotFoundError. The developer also routed all logging to stderr because stdout carries JSON-RPC messages over stdio, and wrote tool errors as suggested next steps so Claude can recover, though the planner still concluded the user loves taxis.", "body_md": "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.\n\nThe 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.\n\nI 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.\n\nI 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.\n\nThere’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.\n\nEach 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.\n\nAll 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.\n\nThis 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.\n\nThat 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.\n\nIf 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:\n\n``` python\nfrom mcp.server import MCPServermcp = MCPServer(\"travel-planner\")\n```\n\nSo if an example breaks on the very first line, check which SDK version it was written for, before you start doubting yourself. 🙃\n\nHere’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.\n\n``` python\n@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.\"\"\"\n```\n\nFor 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.\n\nThe 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.\n\nThese look like tiny details, but each one prevents a quiet bug.\n\nThis 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:\n\n```\nNo trip with id 7. Run list_trips and find the correct trip_id.\n```\n\nThe 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.\n\nBefore connecting the server to Claude Desktop, I tested all three tools in the MCP Inspector (npx @modelcontextprotocol/inspector), including the not-found error.\n\nAt 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.\n\nThis 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.\n\nI 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.\n\nThe 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):\n\n```\n---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.\n```\n\ntype and verdict use closed lists (loved, liked, disliked, hated for the verdict), so they can work as filters later.\n\nThe 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.\n\nI rejected two other options:\n\nIngestion 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.\n\nEvery 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.\n\nEach 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:\n\nupsert 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:\n\n```\nexisting = set(collection.get(include=[])[\"ids\"])current = {chunk[\"id\"] for chunk in chunks}orphans = sorted(existing - current)if orphans:    collection.delete(ids=orphans)\n```\n\nThere’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 loader raises an error when the notes folder is missing or has no .md files.\n\nTwo 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.\n\nThe 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.\n\nFinally, the real test. I asked Claude, “What did I love in Sicily?”\n\nThe results were notes from Vienna. 🤦🏻♀️\n\nIt 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.\n\nThe 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.\n\nNext 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.\n\nThe 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.\n\nThe 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.\n\nsearch_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.\n\nAn 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.\n\nIn Claude Desktop, Claude picked the number of results on its own (8). It also handled my typo “Sicly” without any help. 😁\n\nSo Claude could save my trips and search my memories. The last step was turning all of that into an actual plan.\n\nMCP gives a server three ways to expose things. The difference is who decides when they get used:\n\ndata/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.\n\nWhen a trip and the profile disagree, the trip wins. My profile says relaxed, the Porto trip says packed, and the plan came out packed.\n\nIn 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.\n\nThe prompt also asks for a source tag on every reason, so I can see where each idea came from (sample output):\n\n```\n- 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]\n```\n\nI 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:\n\nI wrote down every flaw I found in the plans. There were 11, and they all came from just four causes:\n\nThe 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.\n\nFor the fourth cause, I now separate two kinds of memory:\n\nA trip memory only becomes a preference if it happens again on another trip, or if I say so myself.\n\nThe 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:\n\nLater articles will cover the evaluation set and the choice between pgvector and Qdrant.\n\nThe 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! 😄\n\nIf you’ve built an MCP server or a RAG setup on personal data, which part gave you the most trouble?\n\n[My Travel Planner Decided I Love Taxis](https://pub.towardsai.net/my-travel-planner-decided-i-love-taxis-131e177af9c7) was originally published in [Towards AI](https://pub.towardsai.net) on Medium, where people are continuing the conversation by highlighting and responding to this story.", "url": "https://wpnews.pro/news/my-travel-planner-decided-i-love-taxis", "canonical_source": "https://pub.towardsai.net/my-travel-planner-decided-i-love-taxis-131e177af9c7?source=rss----98111c9905da---4", "published_at": "2026-11-16 12:31:02+00:00", "updated_at": "2026-11-16 12:51:42.946591+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Claude Desktop", "Model Context Protocol", "MCPServer", "FastMCP", "SQLite", "Chroma", "Python", "Anthropic"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/my-travel-planner-decided-i-love-taxis", "markdown": "https://wpnews.pro/news/my-travel-planner-decided-i-love-taxis.md", "text": "https://wpnews.pro/news/my-travel-planner-decided-i-love-taxis.txt", "jsonld": "https://wpnews.pro/news/my-travel-planner-decided-i-love-taxis.jsonld"}}