Who it is forA developer new to MCP who wants to see a server working before wiring it into an assistant.
The problemIt is hard to know whether a new MCP server works until it is connected to a host.
The outcomeA server.py with a tool and a templated resource, tested interactively in the MCP Inspector.
What you need first
- Python 3.11 or later
- uv or pip
- The cli extra for the mcp command-line tool
- Optional: the MCP Inspector, which mcp dev opens
Steps
- Install with
uv add "mcp[cli]" - Create server.py with an MCPServer, an add tool and a greeting resource, as in the README
- Open it in the Inspector with
uv run mcp dev server.py - Call add with a=1 and b=2 and check you get 3 back
- Continue with the Get started guide in the docs
Prompt for your agent
Using modelcontextprotocol/python-sdk, create a server.py that exposes <tools> and a resource for <data>. Open it with `uv run mcp dev server.py` and show me each tool working in the Inspector.
Caveat. The SDK is on v2; code written for v1 needs the migration guide.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for modelcontextprotocol/python-sdk and "Build an MCP server and test it in the Inspector"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer