AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
API Integration/
python-sdk
python-sdk logo

python-sdk

Active·★ 24.7k·MIT·Updated 2026-10-27
★ Most Popular★ Essential

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.

This write-up is based on the project's README and public repository data. We have not hand-tested the tool. Data as of 2026-10-24.

License
MIT
Latest release
v2.3.0 · 2026-10-02
Last commit
2026-10-24
Contributors
196
Forks
4,073
Open issues and PRs
364
First published
2024-09-24
PyPI package
mcp 2.3.0 · 70,116,877 downloads last week

Source: GitHub, npm and PyPI public APIs.

#Python SDK#LLM Integration#Model Context Protocol#API Development#Server Framework#Client Library#AI Tooling
$ Install
$ uv add "mcp[cli]"
↗ Visit site★ GitHub
01

Features

01Build MCP servers to expose tools, resources, and prompts to LLM applications.
02Develop MCP clients to connect to and interact with any MCP server.
03Support for standard transports: stdio, Streamable HTTP, and SSE.
04Simplified server development with Python type hints for schema definition, eliminating manual JSON Schema and validation.
02

Why choose it

+Official SDK, tracking the specification most closely.
+Covers servers and clients with all standard transports.
+CLI tooling for development, running and installing servers.
+MIT licensed with dedicated documentation and an API reference.
03

Trade-offs

!Lower-level than higher-level frameworks; features such as automatic client tooling or interactive apps need more of your own code.
!Version 2 changed APIs, so check the migration notes when upgrading older servers.
!Python 3.10+ only; other languages need their respective official SDKs.
05

Maintenance check

ActiveChecked: 2026-10-24
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
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 0, 4, 13, 9, 12, 3, 1, 1, 29, 1, 10, 5

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.

04

Who it fits

Pick it if
  • 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).
Look elsewhere if
  • 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.
06

How it differs

fastmcp logovs fastmcp★ 28.2k

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.

Full comparison →
07

Compatibility

Python
Runtime
Verified via docs
08

Quick start

1
$ uv add "mcp[cli]"
09

Use cases

↳Integrating custom business logic and data sources with LLM-powered applications.
↳Creating secure and standardized interfaces for LLMs to access external functions.
↳Developing modular and interoperable components for AI systems.
↳Building backend services that can be consumed by various LLM hosts.
10

Alternatives

⚡Top VS:
VSfastmcp★28.2k→VSruby-sdk★940→VSfastmcp-ts★80→VSmcp-server-cloudflare★4.4k→
fastmcp logo
fastmcp★ 28.2k
🚀 The fast, Pythonic way to build MCP servers and clients.
VSCompare→
ruby-sdk logo
ruby-sdk★ 940
The official Ruby SDK for the Model Context Protocol.
VSCompare→
fastmcp-ts logo
fastmcp-ts★ 80
🏎️ The official FastMCP TypeScript library - build MCP servers, clients, and apps... fast! 🏎️
VSCompare→
mcp-server-cloudflare logo
mcp-server-cloudflare★ 4.4k
No description provided.
VSCompare→
ext-apps logo
ext-apps★ 3.0k
Official repo for spec & SDK of MCP Apps protocol - standard for UIs embedded AI chatbots, served by MCP servers
VSCompare→
Figma-Context-MCP logo
Figma-Context-MCP★ 16.1k
MCP server to provide Figma layout information to AI coding agents like Cursor
VSCompare→
mcp-server-arangodb logo
mcp-server-arangodb★ 46
This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB.
VSCompare→
gopher-mcp logo
gopher-mcp★ 16
A modern, cross-platform Model Context Protocol (MCP) server that enables AI assistants to browse and interact with both Gopher protocol and Gemini protocol resources safely and efficiently.
VSCompare→
See all alternatives →

Featured in these lists

  • SDKs, Frameworks & Official Reference Servers for Building with MCP

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs05Maintenance check04Who it fits06How it differs07Compatibility08Quick start09Use cases10Alternatives
modelcontextprotocol /
python-sdk
↗

Official Python SDK for MCP servers and clients

24.7k4.1kMIT
Last commit1d ago
StatusActive
CategoryAPI Integration
Contributors196
Latest releasev2.3.0
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.