Build a tool server any assistant can use
Publish your tools over the Model Context Protocol so any assistant that speaks it can call them.
You build: server.py: an MCP server with two Parcel Desk tools, tested in the inspector and connected to a coding agent.
- Python 3.11 or newer and uv
- Node.js 22 or newer (for the inspector)
-
01Write a server with two tools: lookup_parcel and list_claims
The server runs as a child process and talks over standard input and output. Nothing listens on the network yet.
npx @modelcontextprotocol/inspector uv run --with mcp server.pyYou pass when: The inspector opens and lists both tools with a description and typed arguments.
-
02Call lookup_parcel with an id that does not exist
npx @modelcontextprotocol/inspector uv run --with mcp server.pyYou pass when: The tool returns a plain sentence saying the parcel was not found. No stack trace reaches the caller.
-
03Add the server to your coding agent and ask about a parcel
claude mcp add parcel -- uv run --with mcp server.py && claude mcp listYou pass when: The server is listed as connected, and the agent answers a parcel question by calling your tool. Other agents have their own add command.
-
04Serve the same tools over HTTP so a remote assistant can reach them
Local process for tools on your machine, HTTP for tools shared by a team. Flisk scaffolds the second kind with flisk resource <name> --type mcp.
npx @modelcontextprotocol/inspectorYou pass when: With the server started in HTTP mode, the inspector connects by URL and shows the same two tools.
The check runs on the computer, not on your word: a step passes when its command exits with 0 there.
Computers are not set up on this site yet. Run each command on your own machine and compare with "You pass when".
Commands run in labs/32-mcp-server and may take up to 60 seconds each. Every command starts a new shell: put keys and settings in a .env file there, it is loaded each time.