Python MCP Server Starter Kit: Pro
A small, readable Python project for building your own MCP server. Tools, resources, prompts, stdio and HTTP, with pytest tests that pass.
If you want Claude Desktop, Claude Code, Cursor or another MCP client to call your own Python code, the first afternoon usually goes on wiring: picking a transport, keeping logs off stdout so stdio doesn't break, returning errors the client can read, and working out how to test any of it.
This kit is that afternoon, already done and tested. You copy it, rename it, and replace the example tools with your own.
It's built on the official `mcp` Python SDK v2 (`MCPServer`, the class that was called `FastMCP` in v1). We tested it with mcp 2.3.0 on Python 3.13, and it needs Python 3.11 or newer. It's plain code you can read in one sitting, not a framework or a hosted service.
What a test looks like:
async def test_add(client):
result = await client.call_tool("add", {"a": 2, "b": 3.5})
assert result.structured_content == {"result": 5.5}
Goods Press makes and sells this kit.
WHAT'S IN PRO
Everything in Standard, plus:
- Bearer-token auth middleware for HTTP. It uses a constant-time compare and leaves `/healthz` public, and it comes with notes on when to move to OAuth
- A production ASGI app (streamable HTTP + `/healthz`) run with uvicorn
- A Dockerfile and `.dockerignore`: slim, non-root, with a healthcheck, and it honours `$PORT`
- Deploy recipes and configs for Fly.io (`fly.toml`), Railway (`railway.json`) and Google Cloud Run (`service.yaml` + gcloud steps) in `DEPLOY.md`
- Two more example servers:
- SQLite: a schema resource, `list_tables`, and a SELECT-only `query` tool on a read-only connection
- REST API wrapper: timeouts, HTTP errors mapped to `ToolError`, an API-key header, and trimmed payloads
- A GitHub Actions workflow: ruff + pytest on Python 3.11, 3.12 and 3.13, then a Docker build and an auth smoke test
- 27 pytest tests, including real-HTTP auth tests against uvicorn and mocked REST tests
- License: 1 developer, or 1 team within one organization
REQUIREMENTS
- Python 3.11+
- `mcp[cli]>=2.3,<3`, installed for you by `pip install -e ".[dev]"`
- An MCP client to connect (Claude Desktop, Claude Code, Cursor, etc.), or Node for the optional MCP Inspector
- Pro deploys: Docker and an account on the platform you choose
UNTESTED PARTS (PLEASE READ)
- We have not tested the Docker image or the Fly.io / Railway / Cloud Run recipes on those platforms. They follow each platform's documented format, but we haven't deployed them end to end. The test suite covers the application itself.
- The kit targets mcp 2.x. If your project is pinned to mcp 1.x (`FastMCP`), it won't drop straight in.
- MCP clients sometimes change their config formats. The README links to each client's docs.
FAQ
Do I need to know MCP already? No. Basic Python and async are enough. The README covers running the server, connecting a client and changing the tools.
Is this a hosted MCP server? No. It's source code that you run and own.
Can I use it for client or commercial work? Yes. Standard covers 1 developer, and Pro covers 1 developer or 1 team in one organization. You can't resell or redistribute the kit itself.
Standard or Pro? Standard is enough for a local server that a desktop client launches. Pro is for running over HTTP with auth or in a container, or if you want the SQLite and REST examples.
Updates? When we post a new version, re-download it from your Payhip library.
Support? goodspress@mail.grokbot.com
REFUND POLICY
14 days. If the kit isn't useful to you, email goodspress@mail.grokbot.com within 14 days of purchase for a full refund.