# python-sdk

> The official Python SDK for Model Context Protocol servers and clients

- **URL**: https://www.freshcrate.ai/projects/python-sdk
- **Author**: modelcontextprotocol
- **Category**: RAG & Memory
- **Latest version**: `v1.27.2` (2026-05-29)
- **License**: MIT
- **Source**: https://github.com/modelcontextprotocol/python-sdk
- **Homepage**: https://modelcontextprotocol.github.io/python-sdk/
- **Language**: Python
- **GitHub**: 22,712 stars, 3,339 forks
- **Registry**: github
- **Tags**: `python`

## Description

The official Python SDK for Model Context Protocol servers and clients

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v1.27.2` | 2026-05-29 | High | ## What's Changed * [v1.x] ci: deploy docs to py.sdk.modelcontextprotocol.io via Pages artifact by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/2635 * [v1.x] Add subject and claims to AccessToken by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/2690 * [v1.x] Bind transport sessions to the authenticated principal by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/2719 * [v1.x] Scope experimental tasks to the session that crea |
| `v1.27.1` | 2026-05-08 | High | ## What's Changed * [v1.x] fix: catch PydanticUserError when generating output schema (pydantic 2.13 compat) by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/2435 * [v1.x] fix(auth): coerce empty-string optional URL fields to None in OAuthClientMetadata by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/2405 * [v1.x] build: restrict httpx to <1.0.0 by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/2559 * [v1.x] refactor |
| `v1.27.0` | 2026-04-02 | High | ## What's Changed * fix: remove unused `requests` dependency from simple-chatbot example by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/1959 * ci: backport conformance tests from main to v1.x by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/2068 * fix: add RFC 8707 resource validation to OAuth client by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/2069 * feat: add idle timeout for StreamableHTTP sessions by |
| `v1.26.0` | 2026-01-24 | Low | ## What's Changed * ci: add all-green job to pull-request-checks workflow by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/1929 * Backport: Support for Resource and ResourceTemplate metadata by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/1928 * [v1.x] fix: return HTTP 404 for unknown session IDs instead of 400 by @LucaButBoring in https://github.com/modelcontextprotocol/python-sdk/pull/1945   **Full Changelog**: https://github.com/modelcontex |
| `v1.25.0` | 2025-12-18 | Low | ## Branching Update  Starting with this release, the repository has adopted a new branching strategy for v2 development:  - **`main`** — v2 development (breaking changes) - **`v1.x`** — v1 maintenance (security and critical bug fixes only, with very rare feature additions ported from `main`)  Users who need to stay on v1.x should pin to `mcp>=1.25,<2`.    The current plan is to work through v2 and have it released some time in Q1. This also relies on the next upcoming spec release whic |
| `v1.24.0` | 2025-12-12 | Low | ## What's Changed * feat: client-side support for SEP-1577 sampling with tools by @jlowin in https://github.com/modelcontextprotocol/python-sdk/pull/1722 * Fix JSON-RPC error response ID matching by @crondinini-ant in https://github.com/modelcontextprotocol/python-sdk/pull/1720 * Add `streamable_http_client` which accepts `httpx.AsyncClient` instead of `httpx_client_factory` by @Kludex in https://github.com/modelcontextprotocol/python-sdk/pull/1177 * fix: use correct python command name in t |
| `v1.23.3` | 2025-12-09 | Low | ## What's Changed * refactor(auth): remove unused _register_client method by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/1748 * feat: add workflow to comment on PRs when released by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/1750 * fix: allow MIME type parameters in resource validation (RFC 2045) by @antonpk1 in https://github.com/modelcontextprotocol/python-sdk/pull/1755 * Skip empty SSE data to avoid parsing errors by @injusticescor |
| `v1.23.2` | 2025-12-04 | Low | ## What's Changed * fix: add lifespan context manager to StreamableHTTP mounting examples by @TheMailmans in https://github.com/modelcontextprotocol/python-sdk/pull/1669 * fix: handle ClosedResourceError in StreamableHTTP message router by @Edison-A-N in https://github.com/modelcontextprotocol/python-sdk/pull/1384 * fix: skip priming events and close_sse_stream for old protocol versions by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/1719  ## New Contributors |
| `v1.23.1` | 2025-12-02 | Low | ## What's Changed * chore: update LATEST_PROTOCOL_VERSION to 2025-11-25 by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/1715   **Full Changelog**: https://github.com/modelcontextprotocol/python-sdk/compare/v1.23.0...v1.23.1 |
| `v1.23.0` | 2025-12-02 | Low | ## Summary This release brings us up to speed with the latest MCP spec `2025-11-25`. Take a look at the [latest spec](https://modelcontextprotocol.io/specification/2025-11-25) as well as the release [blog post.](https://blog.modelcontextprotocol.io/posts/2025-11-25-first-mcp-anniversary/)  ## What's Changed * Add tests for JSON Schema 2020-12 field preservation (SEP-1613) by @felixweinberger in https://github.com/modelcontextprotocol/python-sdk/pull/1649 * Add client_secret_basic authentica |

## Citation

- HTML: https://www.freshcrate.ai/projects/python-sdk
- Markdown: https://www.freshcrate.ai/projects/python-sdk.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/python-sdk/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
