Skip to content
CAI
Software that uses CAICheck a score

modelcontextprotocol/python-sdk

73.9

Strong · 16 November 2026

41.9k

lines of production code

Python

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add MCP Everything Server for conformance testing

A new reference implementation, the MCP Everything Server, has been added to the examples directory to support comprehensive Model Context Protocol (MCP) conformance testing. This server implements all protocol features and is designed to validate client and server implementations against the MCP Conformance Test Framework. Users can run the server locally using the provided CLI entry point, with configurable options for port and logging level.

examples/servers/everything-server · high confidence

Add SSE polling demo client with auto-reconnect

A new example client has been added to demonstrate the SSE polling pattern (SEP-1699), featuring automatic reconnection using Last-Event-ID to resume message processing after server-initiated stream closures. The client connects to an SSE polling demo server, invokes the \process\_batch\ tool, and respects server-provided retry intervals, providing a reference implementation for robust long-running task handling.

examples/clients/sse-polling-client · high confidence

Add SSE polling demo server example

A new example server demonstrating the SSE polling pattern with server-initiated stream close for long-running tasks has been added. It includes a \process\_batch\ tool that simulates work with periodic checkpoints, triggering stream closures to allow client auto-reconnection via Last-Event-ID. The demo supports configurable retry intervals and is accessible via the \mcp-sse-polling-demo\ command.

examples/servers/simple-resource, examples/servers/sse-polling-demo · high confidence

Add Skills extension for catalog interaction

Users can now register the new \Skills\ client extension to interact with a skills catalog server. By passing \Skills()\ to the \Client\ constructor, users gain access to a \SkillsClient\ handle that provides typed methods for listing skills (\list\_skills\), retrieving specific skill details (\get\_skill\), and reading skill directories (\read\_directory\). These methods automatically handle pagination via \nextCursor\ and validate server responses against the SEP-2640 specification.

src/mcp/client/extensions · high confidence

Add Streamable HTTP server example with resumability and CORS support

A new example server located at examples/servers/simple-streamablehttp demonstrates the Streamable HTTP transport, featuring resumability via an in-memory event store and CORS middleware for browser-based clients. The server binds to 127.0.0.1 by default, supports JSON responses or SSE streams, and includes a tool that sends configurable notifications with Last-Event-ID support for stream recovery.

_examples/servers/simple-streamablehttp-stateless/mcp\_simple\_streamablehttp\_stateless, examples/servers/simple-streamablehttp/mcp\_simple\streamablehttp · high confidence

Add low-level structured output server example

Added a new example server in \examples/servers/structured-output-lowlevel\ that demonstrates how to implement structured output using the low-level MCP server API. The example defines a \get\_weather\ tool that returns simulated weather data, including temperature, conditions, humidity, wind speed, and timestamp, utilizing the \structured\_content\ field in the tool result.

examples/servers/structured-output-lowlevel · high confidence

Add simple-auth-client example with OAuth and streamable HTTP support

A new example client (\mcp\_simple\_auth\_client\) is introduced to demonstrate connecting to an MCP server using the streamable HTTP transport with OAuth authentication. The example implements a complete OAuth authorization code flow, including an in-memory token storage, a local callback server to capture the authorization response, and validation of the \iss\ parameter. It serves as a reference implementation for users integrating OAuth with the MCP protocol.

_examples/clients/simple-auth-client/mcp\_simple\_auth\client · high confidence

Add simple-chatbot example client

Introduces a new example client in \examples/clients/simple-chatbot\ that demonstrates how to connect to and interact with MCP servers. The implementation includes a main script (\main.py\) for managing server connections, executing tools with retry logic, and formatting tool definitions for LLM consumption, alongside a sample configuration file (\servers\_config.json\) and environment template (\.env.example\) to facilitate local setup.

_examples/clients/simple-chatbot/mcp\_simple\chatbot · high confidence

Add simple-pagination example server with cursor-based pagination

A new example server, mcp-simple-pagination, is introduced to demonstrate cursor-based pagination for tools, resources, and prompts. It serves 25 paginated tools (5 per page), 30 paginated resources (10 per page), and 20 paginated prompts (7 per page), returning a nextCursor for subsequent requests. The server supports both stdio and Streamable HTTP transports.

examples/servers/simple-pagination · high confidence

Add simple-prompt example server with optional context and topic arguments

A new example server (\mcp\_simple\_prompt\) is introduced to demonstrate prompt handling. It exposes a single 'Simple Assistant Prompt' that accepts optional \context\ and \topic\ arguments, allowing users to provide additional background or focus areas for the generated response. The server supports both stdio and streamable-http transports, binding to 127.0.0.1 by default for HTTP.

_examples/servers/simple-prompt/mcp\_simple\prompt · high confidence

Client module restructured with new transport, caching, and subscription APIs

The \src/mcp/client\ package has been reorganized into a modular structure, introducing a \Transport\ protocol and dedicated implementations for SSE (\sse\_client\) and in-memory testing (\InMemoryTransport\). This update adds a client-side response cache (\CacheConfig\, \InMemoryResponseStore\) and a driver for \InputRequiredResult\ multi-round-trip handling. It also introduces a \ClientExtension\ API for customizing client behavior, a \listen()\ function for server-side subscription events, and auto-negotiation of protocol eras during connection. The CLI entry point has been migrated from \click\ to \argparse\.

src/mcp/client · high confidence

Documentation restructured with tested, runnable code examples

The documentation source has been reorganized into topical sections (apps, asgi, authorization, caching, cancellation, client, client\_callbacks, client\_transports, completions, context, dependencies, deploy, elicitation, extensions, first\_steps, handling\_errors, header\_parameters, identity\_assertion) containing complete, runnable Python tutorials. These examples are now the single source of truth: the same files are included in the documentation via \--8\<--\ and executed by CI tests to ensure they remain accurate and up-to-date.

_docs\src · high confidence

Initial implementation of the MCP OAuth Authorization Server

This change introduces the core components for the MCP server's OAuth Authorization Server role, including route definitions for authorization, token, registration, and revocation endpoints, along with metadata handling and request validation. It establishes the server-side infrastructure for OAuth 2.0 flows, supporting client authentication methods like client\_secret\_basic and client\_secret\_post, and enforces strict issuer URL validation (requiring HTTPS except for loopback addresses) and request body limits.

src/mcp/server/auth · high confidence

Introduce MCP CLI package for server management and Claude Desktop integration

Adds a new \mcp\ CLI tool (via \typer\) that allows users to run MCP servers locally and configure Claude Desktop. The CLI provides commands to launch servers using \uv run\ with environment pinning and editable installs, and includes utilities to automatically update Claude's \claude\_desktop\_config.json\ with the correct server command, absolute paths, and environment variables. It also introduces validation to ensure the loaded server object is an instance of \MCPServer\, providing clearer error messages if a low-level \Server\ object is used instead.

src/mcp/cli · high confidence

Introduce self-verifying story examples suite

Adds a new \examples/stories\ directory containing a comprehensive suite of self-verifying example programs (stories) that demonstrate SDK features. Each story includes a \server.py\ and a \client.py\ that runs assertions and exits non-zero on failure, serving as both documentation and executable tests. The suite includes a harness (\\_harness.py\, \\_hosting.py\) to manage client connections (stdio vs. HTTP) and server hosting, along with shared scaffolding for authentication. It covers current features like tools, prompts, resources, lifespan, dual-era support, streaming, and various auth flows (bearer, OAuth), as well as deferred features like caching and MCP Apps.

examples/stories · high confidence

Introduce shared protocol foundation and security primitives

The \src/mcp/shared\ package now provides the core infrastructure for the MCP SDK, including a generic \Dispatcher\ protocol that decouples transport logic from MCP semantics, context-aware memory streams that preserve \contextvars\ across task boundaries, and HTTP utilities for \httpx2\ that enforce origin-boundary redirect following. It also adds security primitives for validating OAuth resource indicators (RFC 8707) and preventing filesystem path traversal in resource handlers, alongside OpenTelemetry helpers for distributed tracing and a specialized error type for URL elicitation requirements.

src/mcp/shared · high confidence

New MCP OAuth authorization server handlers

The MCP server now includes a dedicated set of request handlers for its OAuth authorization server endpoints. This adds support for the authorization code flow with PKCE (authorize.py), dynamic client registration (register.py), token issuance and exchange (token.py), token revocation (revoke.py), and OAuth metadata exposure (metadata.py). These handlers implement the core authorization server logic, including client authentication, scope validation, and PKCE verification, enabling MCP clients to authenticate and obtain access tokens.

src/mcp/server/auth/handlers · high confidence

New automation scripts for documentation, type generation, and testing

Added several new scripts to the repository: \build-docs.sh\ and \serve-docs.sh\ to build and serve combined v1 and v2 documentation using Zensical and MkDocs; \gen\_surface\_types.py\ to regenerate per-version wire-shape Python types from vendored JSON schemas; \update\_readme\_snippets.py\ to keep README code examples in sync with source files; and \test\ to run tests with strict coverage enforcement and UTF-8 locale pinning.

scripts · high confidence

New client example snippets for MCP interactions

Added a new set of example scripts in \examples/snippets/clients\ that demonstrate various client capabilities, including basic stdio and streamable HTTP connections, OAuth and identity assertion authentication, pagination, tool result parsing, resource template completion, and URL elicitation handling.

examples/snippets/clients · high confidence

New documentation tutorials and example servers for MCP v2 features

Added a comprehensive suite of documentation tutorials and example servers demonstrating new MCP v2 capabilities. The \docs\_src\ directory now includes tutorials for client-side caching (\caching/tutorial003.py\), client callbacks and elicitation (\client\_callbacks\), dependency injection with \Resolve\ and \Elicit\ (\dependencies\), elicitation workflows (\elicitation\), lifespan management (\lifespan\), low-level server implementation (\lowlevel\), structured output types (\structured\_output\), and troubleshooting patterns (\troubleshooting\). Additionally, new example servers were added: \complex\_inputs.py\ for Pydantic validation, \memory.py\ for recursive memory with OpenAI embeddings, \weather\_structured.py\ for structured tool outputs, \everything-server\ for full conformance testing including SSE resumability and elicitation, and \simple-auth\ demonstrating the split Authorization Server and Resource Server architecture with OAuth flows.

mcp · high confidence

New example server for fetching websites

Added a new example server (mcp-simple-tool) that exposes a 'fetch' tool, allowing users to retrieve the content of a specified URL. The server supports both stdio and Streamable HTTP transports, with the HTTP mode binding to 127.0.0.1 by default for security.

examples/servers/simple-tool · high confidence

New low-level server example snippets

Added a new set of example scripts in the \examples/snippets/servers/lowlevel\ directory that demonstrate how to build MCP servers using the low-level API. These examples cover basic prompt and tool handling, returning \CallToolResult\ directly with \\_meta\ fields for OpenAI Apps compatibility, managing server lifespan with database connections, and defining tools with structured output schemas.

examples/snippets/servers/lowlevel · high confidence

New middleware for Bearer token authentication and client credential validation

The auth middleware layer now includes dedicated components for handling Bearer token authentication and OAuth client credentials. BearerAuthBackend validates access tokens against a TokenVerifier, optionally enforcing that the token's resource indicator matches the server's URL, while RequireAuthMiddleware ensures requests possess the necessary scopes, returning standard 401/403 errors with WWW-Authenticate headers. AuthContextMiddleware propagates the authenticated user's identity via context variables for downstream access. Additionally, ClientAuthenticator validates client credentials (including client\_secret\_basic and client\_secret\_post methods) for OAuth token endpoint requests.

src/mcp/server/auth/middleware · high confidence

New simple-auth example demonstrating separated Authorization and Resource Server roles

The \examples/servers/simple-auth/mcp\_simple\_auth\ package introduces a complete example of an MCP server implementing the OAuth 2.0 Authorization Server (AS) and Resource Server (RS) separation. It includes a \SimpleOAuthProvider\ for handling the OAuth flow with demo credentials, an \IntrospectionTokenVerifier\ that validates tokens via RFC 7662 introspection, and an \MCPServer\ configured as a Resource Server. The example supports both SSE and streamable-HTTP transports, enforces RFC 8707 resource validation via a strict mode flag, and provides protected MCP tools requiring authentication.

_examples/servers/simple-auth/mcp\_simple\auth · high confidence

New utility modules for context injection, logging, and media handling

The server now includes a new \utilities\ package providing helper tools for developers. This includes context injection utilities that automatically detect and inject \Context\ objects into function parameters, standardized logging configuration with optional Rich console support, and new \Image\ and \Audio\ helper classes that simplify creating media content by handling file paths, binary data, and MIME type detection for MCP protocol responses.

src/mcp/server/mcpserver/utilities · high confidence

Standalone MCP types package for protocol serialization

The protocol message models, JSON-RPC envelope types, per-version surface validators, and protocol-version registry are now available as a standalone \mcp-types\ package. This allows users to install and use \pydantic\-based validation for MCP traffic without pulling in the full SDK. The package exposes a public API via \mcp\_types\ (with \mcp.types\ as a permanent alias) and re-exports all names from the main \mcp\ package for backward compatibility. It includes generated wire-shape models for protocol versions 2025-11-25 and 2026-07-28, with internal per-version packages (\mcp\_types.\v\\) kept private. The \methods.py\ module provides public parse/serialize functions and surface maps keyed by method and version, while \version.py\ offers a registry and comparison helpers for known protocol revisions.

src/mcp-types · high confidence

Support for SEP-990 Identity Assertion OAuth flow

The MCP client now supports the SEP-990 Identity Assertion Authorization Grant (ID-JAG) flow, allowing enterprise identity provider flows to authenticate against an MCP authorization server. This change introduces the \IdentityAssertionOAuthProvider\ in \src/mcp/client/auth/extensions/identity\_assertion.py\, which implements the RFC 7523 jwt-bearer grant type. Users can now configure a confidential client with a fixed authorization server issuer and an assertion provider callback to obtain MCP access tokens. The implementation also replaces the underlying HTTP library from \httpx\ to \httpx2\ and enforces same-origin redirects for the MCP endpoint.

src/mcp/client/auth/extensions · high confidence

Removals

Removal of legacy client session and transport implementations

The \mcp\_python/client\ module has removed the previous \ClientSession\ class and its associated transport implementations for SSE (\sse.py\) and stdio (\stdio.py\). This deletion indicates a structural shift in how the client connects to servers, likely replacing these specific session and transport classes with a new architecture (such as the in-memory transport or structured capability types mentioned in commit history) to improve protocol handling or code organization.

_mcp\python/client · high confidence

Removal of legacy server implementation and transports

The \mcp\_python/server\ package has been completely removed, deleting the legacy \Server\ class, \ServerSession\, and transport implementations (stdio, SSE, and WebSocket). This eliminates the previous server-side API and transport layer from the product.

_mcp\python/server · high confidence

Behavioural changes

Added mcp.types namespace as an import alias for mcp\_types

The SDK now exposes the \mcp\_types\ package's protocol definitions (including JSON-RPC types, method registries, and version constants) under the \mcp.types\ namespace. This allows users to import types using the familiar \mcp.types\ spelling (e.g., \from mcp.types import TextContent\) without directly depending on the separate \mcp\_types\ distribution, while maintaining compatibility with existing code that imports from \mcp\_types\ directly.

src/mcp/types · high confidence

Introduce MCPServer with structured error handling and context utilities

The server entry point now exposes the \MCPServer\ class alongside a dedicated \Context\ object for ergonomic access to request-scoped capabilities like logging, progress reporting, and resource reading. To improve reliability and security, the API introduces specific exception types (\ResourceError\, \ToolError\, and their \Unexpected\ variants) that allow developers to distinguish between anticipated failures and crashes, ensuring that detailed stack traces are never leaked to clients. Additionally, the module re-exports core types such as \Image\, \Audio\, and \Icon\ from the new \mcp-types\ package and provides bindings for the pluggable extension system.

src/mcp/server/mcpserver · high confidence

Introduce MCPServer-based example snippets with StreamableHTTP and auth support

The examples/snippets/servers directory now provides a collection of runnable server demonstrations using the renamed MCPServer class. These examples cover basic tools, resources, prompts, completions, and image handling, and demonstrate modern transport configurations such as stateless HTTP with JSON responses and Starlette mounting (including path and host-based routing). The set also includes examples for OAuth/protected resource authentication via AuthSettings and token verification, as well as progress reporting and sampling.

examples/snippets/servers · high confidence

MCP Server SDK v2: Major API overhaul and 2026-07-28 protocol support

The server module has been completely rewritten for version 2, introducing support for the 2026-07-28 protocol era alongside legacy handshake versions. The primary high-level API \FastMCP\ has been renamed to \MCPServer\, and the legacy \mcp.server.fastmcp\ module now raises an error pointing to the migration guide. The internal architecture has shifted from a \BaseSession\ model to a \Connection\-based model that manages per-client state and standalone outbound channels, supporting both stateful and stateless Streamable HTTP modes. New capabilities include server-side \subscriptions/listen\ support via a pluggable \SubscriptionBus\, elicitation handling, and sampling with tools. Security has been hardened with integrity-protected \requestState\ tokens using AES-256-GCM, DNS rebinding protections, and request body limits. Observability is enhanced with a new \OpenTelemetryMiddleware\ that adds GenAI semantic-convention attributes to spans. Logging delivery is now per-request opt-in for the 2026 era, and deprecated methods like \roots\, \sampling\, and \logging\ have been marked for removal.

src/mcp/server · high confidence

MCP package restructure and expanded type exports

The MCP package has been reorganized under the \src/mcp\ namespace, introducing a standalone \mcp-types\ package for protocol definitions and adding a \py.typed\ marker for proper type checking support. This change significantly expands the public API by exposing new capability types (such as \PromptsCapability\, \ResourcesCapability\, \SamplingCapability\, and \ToolsCapability\), tool-related content types (\ToolChoice\, \ToolResultContent\, \ToolUseContent\), and new error classes (\MCPDeprecationWarning\, \UrlElicitationRequiredError\). Additionally, the package now exports a new \Client\ class and \ClientSessionGroup\ for managing multiple session connections, while renaming \McpError\ to \MCPError\ and flattening parameter structures for better ergonomics.

src/mcp · high confidence

New OAuth2 authentication implementation with PKCE and token refresh

The client authentication module has been replaced with a new implementation supporting the OAuth 2.0 Authorization Code flow with PKCE and automatic token refresh. This change introduces specific exception types for flow, token, and registration errors, and implements logic to handle scope selection and unioning during step-up re-authorization (SEP-2350). It also adds support for appending the 'offline\_access' scope for refresh tokens when supported by the authorization server (SEP-2207) and follows updated discovery URL ordering for protected resource and authorization server metadata.

src/mcp/client/auth · high confidence

New resource management system with template support and security checks

The server now introduces a dedicated \ResourceManager\ and a suite of concrete resource types (\FileResource\, \HttpResource\, \FunctionResource\, etc.) to handle resource serving. This change adds support for URI templates with operator-aware security validation, allowing dynamic resource generation while enforcing security policies. \FileResource\ now uses an explicit \encoding\ field (defaulting to \utf-8-sig\ for text) instead of a binary flag, and \FunctionResource\ supports lazy loading with proper async/sync handling. The system also passes \InputRequiredResult\ through the resource pipeline to support multi-round-trip flows.

src/mcp/server/mcpserver/resources · high confidence

Platform-specific process management for stdio transport

Added platform-specific utilities in src/mcp/os to handle child process lifecycle and stdio isolation. On POSIX, the new terminate\_posix\_process\_tree function ensures that process groups are terminated atomically using SIGTERM and SIGKILL, preventing orphaned processes. On Windows, the module introduces Job Object support to group child processes for clean termination, a FallbackProcess wrapper to support async operations on event loops lacking native subprocess support, and logic to rebind standard handles so that subprocesses correctly inherit stdin/stdout/stderr streams.

src/mcp/os · high confidence

Prompt management now supports input-required results

The prompt rendering pipeline in the server has been updated to handle cases where a prompt requires additional input from the user. The \PromptManager.render\_prompt\ method now returns either a list of messages or an \InputRequiredResult\, allowing the server to properly signal when a prompt cannot be fully rendered without further user interaction.

src/mcp/server/mcpserver/prompts · high confidence

Update MCP Python types for protocol version 2024-10-07

The \mcp\_python\ package has updated its type definitions to align with the Model Context Protocol specification version 2024-10-07. This change ensures that the Python bindings correctly reflect the latest protocol requirements, including adjustments to request and notification method generics and structured capability types.

_mcp\python · high confidence

Updated example servers to use the new MCPServer API

The example servers in the \examples/mcpserver\ directory have been updated to use the renamed \MCPServer\ class (previously \FastMCP\) and the \mcp.types\ module for type imports. These examples now demonstrate the current API surface, including features like icon support, progress reporting, and structured tool results.

examples/mcpserver · high confidence

Test coverage

2 commits adding/updating tests in tests/docs; Added client-side test suite with message spies and OAuth/caching coverage; Added comprehensive test suite for MCPServer; Added comprehensive test suite for server authentication and OAuth flows; Added end-to-end OAuth interaction tests; Added integration tests for MCP server OAuth authorization; Added interaction tests for MCPServer capabilities; Added low-level interaction tests for the 2026-07-28 protocol; Added regression tests for MCP server issues; Added server-side test suite; Added shared test suite for dispatcher, auth, and transport utilities; Added stdio lifecycle and cross-platform transport tests; Added story-style examples suite with comprehensive test coverage; Added tests for CLI configuration and utility functions; Added tests for auth middleware components; Added tests for client credentials and identity assertion OAuth providers; Added tests for documentation source examples; Added tests for low-level server helper types, discovery, and listing handlers; Added tests for prompt rendering and management; Added tests for server resource handling and security; Added tests for the client-side Skills extension; Added tests for the mcp-types package split and protocol versioning; Added tests for tool registration validation and error handling; Initial test suite for MCP protocol types, examples, and test infrastructure; New end-to-end interaction test suite with requirements manifest; New in-process transport test harness for streamable HTTP and stdio interactions.

Dependencies

MCP Python SDK v2: New mcp-types package, httpx2 migration, and example restructure

The SDK has been restructured for version 2, introducing a standalone \mcp-types\ package for protocol definitions and replacing the \httpx\ and \httpx-sse\ dependencies with \httpx2\. The main \mcp\ package now depends on \mcp-types\ and enforces stricter version bounds for libraries like \pydantic\ (\>=2.12.0) and \anyio\. Additionally, the project's example applications have been reorganized into dedicated \examples/clients\ and \examples/servers\ directories, each with their own \pyproject.toml\ manifests, and the documentation tooling has been updated to use Zensical.

(dependencies) · high confidence

Housekeeping

Initial repository structure and development guidelines

The repository is initialized with foundational configuration files including \.git-blame-ignore-revs\ to ignore specific commits in blame output, \.gitattributes\ to mark \uv.lock\ as generated, and a \.pre-commit-config.yaml\ that enforces code quality via ruff (formatting and linting), pyright (type checking), markdownlint, and checks for README snippet and lockfile consistency. Development guidelines are established in \AGENTS.md\ (with \CLAUDE.md\ pointing to it), \CONTRIBUTING.md\ detailing the issue-first PR workflow and AI-assisted contribution policies, \DEPENDENCY\_POLICY.md\ outlining how runtime dependency floors are managed, \RELEASE.md\ describing the v2/v1.x release process, \ROADMAP.md\ tracking the 2026-07-28 spec implementation, \SECURITY.md\ for vulnerability reporting, and \VERSIONING.md\ defining the semantic versioning and support policy. Documentation is configured via \mkdocs.yml\ using the Material theme and mkdocstrings, and the \uv.lock\ file establishes the initial dependency resolution for the \mcp\ and \mcp-types\ packages along with various example projects.

(repo-wide) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 71.4 → 73.9 (+2.5)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 73.2 → 72.8 (-0.4)
  • Architecture 83.7 → 86.2 (+2.5)
  • Maturity 76.3 → 79.0 (+2.7)
  • Readiness 65.4 → 70.1 (+4.7)
  • Security 77.4 → 77.4 (0.0)
  • Performance 100.0 → 100.0 (0.0)

Resolved (13)

  • FileTooLong: docs/translations.py (scripts/docs/translations.py)
  • Hotspot: src/mcp/client/client.py (src/mcp/client/client.py)
  • Hotspot: src/mcp/server/mcpserver/prompts/base.py (src/mcp/server/mcpserver/prompts/base.py)
  • No ADRs found
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion
  • build_config.build_config (cognitive 24) (scripts/docs/build_config.py)
  • check_crossrefs.main (cognitive 19) (scripts/docs/check_crossrefs.py)
  • gen_ref_pages._compact_index (cognitive 31) (scripts/docs/gen_ref_pages.py)
  • gen_ref_pages._compact_index (cyclomatic 20) (scripts/docs/gen_ref_pages.py)
  • gen_ref_pages.generate (cognitive 26) (scripts/docs/gen_ref_pages.py)
  • translations.command_translate (cognitive 27) (scripts/docs/translations.py)
  • translations.command_translate (cyclomatic 21) (scripts/docs/translations.py)

New (45)

  • Edited copies of one member (3 members, 14+ corresponding lines) (examples/servers/everything-server/mcp_everything_server/server.py)
  • Edited copies of one member (3 members, 15+ corresponding lines) (examples/stories/dual_era/server_lowlevel.py)
  • Edited copies of one member (3 members, 22+ corresponding lines) (examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py)
  • Edited copies of one member (3 members, 32+ corresponding lines) (examples/stories/bearer_auth/server_lowlevel.py)
  • Edited copies of one member (3 members, 6+ corresponding lines) (docs_src/subscriptions/tutorial004_anyio.py)
  • Edited copy of a member (10 corresponding lines) (src/mcp/server/mcpserver/utilities/types.py)
  • Edited copy of a member (11 corresponding lines) (examples/servers/everything-server/mcp_everything_server/server.py)
  • Edited copy of a member (12 corresponding lines) (src/mcp/client/session.py)
  • Edited copy of a member (13 corresponding lines) (examples/stories/reconnect/server_lowlevel.py)
  • Edited copy of a member (14 corresponding lines) (docs_src/deploy/tutorial002.py)
  • Edited copy of a member (14 corresponding lines) (src/mcp/server/mcpserver/server.py)
  • Edited copy of a member (15 corresponding lines) (src/mcp/server/connection.py)
  • Edited copy of a member (17 corresponding lines) (examples/servers/structured-output-lowlevel/mcp_structured_output_lowlevel/main.py)
  • Edited copy of a member (17 corresponding lines) (examples/stories/identity_assertion/server.py)
  • Edited copy of a member (18 corresponding lines) (examples/servers/simple-auth/mcp_simple_auth/auth_server.py)
  • Edited copy of a member (19 corresponding lines) (examples/servers/simple-auth/mcp_simple_auth/simple_auth_provider.py)
  • Edited copy of a member (19 corresponding lines) (src/mcp/server/mcpserver/server.py)
  • Edited copy of a member (2 corresponding lines) (docs_src/extensions/tutorial004.py)
  • Edited copy of a member (2 corresponding lines) (docs_src/middleware/tutorial001.py)
  • Edited copy of a member (20 corresponding lines) (src/mcp/client/auth/extensions/client_credentials.py)
  • …and 25 more

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • src/mcp-types — 2 commits

Notable commits

  • change: Generate single-line model_config in surface types (#3820)
  • change: Keep unknown keys on client and server capabilities (#3812)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

modelcontextprotocol/python-sdk was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 16 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 77001c96f9507be0f4d009b83210a384a5e08bda — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.83+preprod-a489942cf94b.