Who it is forAn engineer preparing to deploy an MCP server rather than run it as a local subprocess.
The problemLocal stdio servers are fine for one laptop, but a shared server needs an HTTP transport and a client to test it.
The outcomeA server reachable at a URL and a short Python client that calls its tools and prints structured results.
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]" - Serve your server with
uv run mcp run server.py --transport streamable-http - Write a client that opens Client("http://localhost:8000/mcp") and calls call_tool, as in the README
- Read result.structured_content for the output
- See the Clients docs to launch a local server as a stdio subprocess instead
Prompt for your agent
Using modelcontextprotocol/python-sdk, serve my server.py with `uv run mcp run server.py --transport streamable-http` and write a Python client that calls <tool> with <arguments> and prints the structured result.
Caveat. The README example runs on localhost with no authentication; add auth before exposing a server beyond your machine.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for modelcontextprotocol/python-sdk and "Serve an MCP server over HTTP and call it from Python"
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