Back to Explore

modelcontextprotocol/python-sdk

GitHub
14 updates · last 90 days1 watchersOpen source

Last release:

The Model Context Protocol (MCP) Python SDK is the official Python implementation for building MCP servers and clients. It helps you expose MCP features like resources, prompts, and tools, and supports common transports such as stdio, SSE, and Streamable HTTP so LLM applications can connect in a standardized way.

Project status

  • Actively maintained, with very recent upstream activity (last push 2026-08-26) and multiple published updates across 2026-08-24 to 2026-08-26.
  • Apparent update cadence is high, roughly daily over the last few days (v2.1.0 on 2026-08-24, v2.1.1 on 2026-08-25, v2.0.1 on 2026-08-26).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.0.1

    v2.0.1 is a targeted backport that improves the failure behavior when importing the removed v1 module path `mcp.server.fastmcp` on the MCP 2.x line. It ensures the resulting `ModuleNotFoundError` message points developers to the v2 migration guide, and updates documentation to match the new guidance.

  • v2.1.1

    v2.1.1 focuses on improving the developer experience when code still imports the removed v1 module path mcp.server.fastmcp. While the release notes mention pointing imports to the migration guide, the code introduces an explicit shim module that changes the exact import failure behavior for both the module and any submodule imports.

  • v2.1.0

    v2.1.0 introduces new ergonomics and protocol-handling behavior for MCP clients and servers, including direct `StdioServerParameters` support, broader content block types in prompt messaging, and updated request-body limits that now also cover SSE and OAuth endpoints. It also changes handler exception and content-block return annotation behavior, plus several HTTP and session-handling fixes. The release notes primarily describe runtime protocol and API-shape behavior changes, but the provided code-diff excerpt mostly shows repository automation and documentation additions.

    BreakingFeatures
  • v1.29.1

    v1.29.1 updates FastMCP behavior around settings initialization timing, enforces request body size limits for SSE and OAuth endpoints, and changes JSON schema generation for recursive tool return types. The release notes describe these three items, but the diff also includes additional deprecation and behavioral guidance for the experimental tasks APIs that is not mentioned in the release notes.

    Breaking
  • v2.0.0

    v2.0.0 is the stable release of the MCP Python SDK aligned to the 2026-07-28 Model Context Protocol revision, while still supporting earlier 2025-era clients from the same server. The release introduces a unified v2 programming model centered on MCPServer and a first-class Client, with support for multi-round-trip requests, extension APIs, and hardened stdio and OAuth-based auth.

    BreakingSecurityFeatures
  • v1.29.0

    v1.29.0 release notes focus on MCP client/server runtime behavior tweaks, plus multiple documentation and build-site changes. Documented code changes include rerouting Route context progress reporting to the originating request stream, enforcing Streamable HTTP request body limits, and fixing tool-name validation to reject a trailing newline. The remaining items in the notes are documentation and CI/build adjustments.

    Features
  • v2.0.0rc1

    v2.0.0rc1 is the first v2 release candidate of the MCP Python SDK, focusing on aligning client and server identity metadata with the 2026-07-28 spec shape, and expanding 2026-era behavior to stdio servers. It also includes an API cleanup pass (cache config, OAuth provider surface, message handler signature, FileResource) plus Streamable HTTP request-body size limits and stdio wire isolation changes.

    BreakingFeatures
  • v2.0.0b2

    v2.0.0b2 is a second beta for the MCP Python SDK, with pre-releases opt-in only, and it continues to keep `pip install mcp` on the stable 1.x line. The release notes emphasize an HTTP stack switch to httpx2, adding the client-side subscriptions/listen driver, improving request cancellation on the 2026 transports, and extending resolver dependency injection for sampling and listing roots.

    BreakingFeatures
  • v2.0.0b1

    v2.0.0b1 is the first beta of the Python MCP SDK, adding full support for the 2026-07-28 MCP specification era. It introduces a new sessionless, stateless core architecture, a new `Client`, and renames/restructures server APIs around `MCPServer`, along with protocol type separation, resolver DI, richer URI templates, extensions, and default OpenTelemetry tracing.

    BreakingSecurityFeatures
  • v1.28.1

    Release v1.28.1 documents three changes: per-request buffering for StreamableHTTP streams (including storing the priming event before dispatch), setting the server’s “Development Status” classifier to Production/Stable, and adding TransportSecuritySettings support to the WebSocket server transport. No other breaking changes are called out in the release notes.

  • v2.0.0a3

    This alpha release (v2.0.0a3) expands the 2026-07-28 stateless protocol so the modern HTTP transport path is negotiated and wired end-to-end, and it also introduces a standalone `mcp-types` package for wire model types. It reshapes middleware and client/server session internals to support the new protocol behavior, plus adds multi-round tool call plumbing for `InputRequiredResult`.

    BreakingFeatures
  • v2.0.0a2

    v2.0.0a2 is the second v2 alpha release and remains opt-in, while `pip install mcp` continues to resolve to the stable 1.x line. The main changes are new per-version 2025-11-25 and 2026-07-28 protocol type sets with negotiated wire validation, and a refactor of `ClientSession` to run on `JSONRPCDispatcher` (removing `BaseSession`).

    BreakingFeatures
  • v1.28.0

    v1.28.0 adds Python 3.14 support and documents upcoming deprecations for two API surfaces: the WebSocket transport and the experimental tasks entry points. It also includes a task payload fix (omit null optional fields) and various test/doc maintenance changes. The release notes focus on DeprecationWarning behavior ahead of planned v2 removals.

    Features
  • v2.0.0a1

    v2.0.0a1 is the first alpha release of the MCP Python SDK, introducing the larger v2 architectural rewrite needed for the upcoming MCP spec changes. The release notes emphasize that this alpha is intentionally breaking, and direct users to the migration guide while noting it only implements the 2025-11-25 spec revision.

    BreakingFeatures
  • v1.27.2

    v1.27.2 updates authentication token modeling (adding subject and claims), and changes experimental task behavior to bind task visibility to the session that created them. It also adds infrastructure to bind session context to the authenticated principal and to scope experimental task identifiers accordingly.

    BreakingFeatures
  • v1.27.1

    Patch release focused on compatibility and input normalization rather than new functionality. It makes schema generation resilient to Pydantic 2.13's error type, accepts empty-string values for optional OAuth client URL metadata, and tightens the httpx dependency to the 0.x line while switching SSEError to httpx_sse's public API.

  • v1.27.0

    v1.27.0 is mostly a docs and CI refresh, but it also includes a handful of important runtime fixes. The user-facing code changes center on OAuth resource validation, StreamableHTTP session idle timeouts, more resilient stdio/request teardown handling, and a backported Tasks capability update.

    SecurityFeatures
  • v1.26.0

    v1.26.0 primarily adds metadata plumbing for FastMCP resources and resource templates, carrying `meta` through model construction, listing, and read responses. It also changes the streamable HTTP session error path so unknown session IDs return HTTP 404 instead of 400, and adds a CI-only all-green workflow job.

    BreakingFeatures
  • v1.25.0

    This release mainly fixes Url Elicitation handling so `UrlElicitationRequiredError` now propagates as the MCP `URL_ELICITATION_REQUIRED` error instead of being wrapped as a generic tool failure. It also updates CI to include the `v1.x` maintenance branch and formalizes the repo’s new branching strategy for v2 development. The notes advise users who need to remain on v1.x to pin `mcp>=1.25,<2`.

  • v1.24.0

    v1.24.0 adds client-side support for SEP-1577 sampling (including tooling) and introduces a new `streamable_http_client` that works with `httpx.AsyncClient`. It also fixes a JSON-RPC error response issue where the response ID was not matched correctly.

    Features