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.
-
Write 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.
Run this to check
npx @modelcontextprotocol/inspector uv run --with mcp server.pyYou pass when
The inspector opens and lists both tools with a description and typed arguments.
Files you write
- server.py
-
Call lookup_parcel with an id that does not exist
Run this to check
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.
Files you write
- server.py
-
Add the server to your coding agent and ask about a parcel
Run this to check
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.
-
Serve 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
--type mcp. Run this to check
npx @modelcontextprotocol/inspectorYou pass when
With the server started in HTTP mode, the inspector connects by URL and shows the same two tools.
Files you write
- server.py