MCP server project · Chapter 12 of 12
Shipping
By the end of this chapter you can write the config files two real assistants read to reach DabbaDrop's server, one over stdio and one over HTTP, keep the member's token out of any shared file, say which changes to the tools break the assistants already using them, and give each release the version number that tells them so. Build it in your browser: a real editor and terminal, AI that explains, and tests that tell you when it works.
- Part: Ready for every assistant
- 3 tasks
- Python
- In the all labs plan
The first 2 chapters of MCP server project are free. This one comes with the all labs plan.
Why you need this
Launch is Monday 2 November. Tara uses Claude Desktop; Advait uses VS Code. In October each of the 4 integrations was set up by hand, with a password or a cookie pasted somewhere. Farah wants the opposite: one server, and a few lines of config that any member can follow, with their own token and nothing else.
Then the server keeps changing. Farah already wants find_dish's dish_name renamed to dish. That looks harmless, and the server would accept the new name at once. But every assistant that learned dish_name from tools/list keeps sending it: a saved workflow, a prompt, a model's habit. After the rename, those calls fail. The code so far cannot tell a harmless change from one like that, and nothing tells Advait's VS Code that the server it talks to has changed under it.
What you build: 3 tasks
Each task has tests. You write the code in the lab's editor and press Check.
- Task 1
clients.py: the config files assistants read
Write claude_desktop_config(python, database_url, token) and vscode_config(url) in mcp_server/clients.py. The first returns {"mcpServers": {"dabbadrop": {"command": python, "args": ["-m", "mcp_server", "--stdio"], "env": {"DATABASE_URL", "DABBA_MCP_TOKEN"}}}}. The second returns {"inputs": [a promptString input dabbadrop-token, with a description and password true], "servers": {"dabbadrop": {"type": "http", "url": url, "headers": {"Authorization": "Bearer ${input:dabbadrop-token}"}}}}.
The Check compares both with the files Claude Desktop and VS Code read, then starts the server the way Claude Desktop would, from your config: the command, its arguments and its environment, with Tara's token, and lists its tools.
- Task 2
versions.py: what breaks
Write breaking_changes(old, new) in mcp_server/versions.py: for each tool of old in order, "<tool> was removed" when new lacks it; otherwise, for each of its parameters in order, "<tool>: parameter <p> was removed" or "<tool>: parameter <p> changed type" (type_of differs), then "<tool>: parameter <p> is now required" for each parameter required in new but not in old, sorted.
The Check compares the released tools (contract/tools-1.0.0.json) with changed copies: a tool removed, dish_name renamed to dish, quantity made a string, find_slots' time made required, a new tool and a new optional parameter (no breaking change), and a new description (none).
- Task 3 · interview question
Interview: versions.py, the next version
Write next_version(current, old, new) in mcp_server/versions.py: MAJOR+1.0.0 when breaking_changes finds anything; MAJOR.MINOR+1.0 when new has a tool old lacks or a tool with a parameter it did not have; MAJOR.MINOR.PATCH+1 for any other difference; current when nothing changed.
The Check asks for the next version of 1.4.2 after each change of Task 2's, and python -m mcp_server.release compares the server with its contract.
Kunal will ask: Farah wants find_dish's dish_name renamed to dish. Who breaks, and how would you ship it without breaking them?
What you will learn
- stdio config: Claude Desktop's claude_desktop_config.json, where the client starts the server itself.
- HTTP config: VS Code's .vscode/mcp.json, with an input for the token so the file holds no secret.
- What breaks an old client, and what does not.
- Semantic versioning: what MAJOR.MINOR.PATCH promises.
- The contract file and python -m mcp_server.release.
- The take-home: the whole project, on your own machine.
More in Ready for every assistant
Build "Shipping" yourself
DabbaDrop wants AI assistants like Claude Desktop to order for its members, safely. You build the MCP server that lets them, and only as the member who allowed it. A real editor and terminal in your browser, AI that explains, and a Check that says when it works.
The first 2 chapters of MCP server project are free. This one comes with the all labs plan.