python-sdk
The MCP Python SDK is the official Python implementation of the Model Context Protocol, maintained by the protocol's own organisation. It lets you build MCP servers that expose tools, resources and prompts to any MCP host, and MCP clients that connect to any server, over every standard transport: stdio, Streamable HTTP and SSE.
It is the reference choice for Python developers who want to stay closest to the specification, for example when building a server that will be used by many different clients or when implementing a custom MCP host. A minimal server takes around 15 lines, and the optional `cli` extra adds the `mcp` command with `mcp dev` for testing a server in the MCP Inspector, `mcp run` for running it with a chosen transport, and `mcp install` for registering it with a client. Version 2 is documented with a "what's new" guide and a full API reference.
Getting started: requires Python 3.10+. Run `uv add "mcp[cli]"` (or pip), write a `server.py`, then use `uv run mcp dev server.py` to inspect it or `uv run mcp run server.py --transport streamable-http` to serve it over HTTP.
Features
Why choose it
Trade-offs
Maintenance check
- Last commit
- 2026-10-24
- Commits, last 90 days
- 100+
- Releases, last 90 days
- 10
- Latest release
- v2.3.0 (2026-10-02)
- Open issues
- 364
- Recent issues with at least one comment
- 16/19
Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.
Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.
Most discussed open issues
- #1705 Document and provide hooks for sandboxing file and network access in MCP tools29 comments · 2025-11-28
- #423 MCP SSE Server: Received request before initialization was complete25 comments · 2025-04-03
- #1401 ClientSession Error Handling24 comments · 2025-09-25
- #262 cannot get response from await session.call_tool()16 comments · 2025-03-12
- #2416 Bug: AssertionError: Request already responded to — cancellation race in v1.27.015 comments · 2026-04-09
Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.
Who it fits
- You want the official, MIT-licensed reference Python SDK maintained directly by the Model Context Protocol project.
- You need full low-level control over MCP primitives (resources, prompts, tools, sampling) and standard transports (stdio, SSE, Streamable HTTP).
- You want higher-level conveniences like automatic client composition or less decorator boilerplate; FastMCP wraps the protocol with extra ergonomics.
- You are exposing an existing GraphQL or FastAPI backend where a gateway or adapter (Grafbase or FastAPI-MCP) requires no manual tool code.
How it differs
The official Python SDK (MIT) is the canonical protocol implementation from the MCP organisation; FastMCP (Apache-2.0) builds a higher-level developer framework for servers, clients, and apps.
Compatibility
Quick start
Use cases
Alternatives
Featured in these lists
Comments
No comments yet. Be the first!