The ModelContextProtocol (MCP) Python SDK has released its first v2 release candidate, v2.0.0rc1. This pre-release is opt-in only and introduces significant API cleanup and alignment with the upcoming 2026-07-28 spec.

  • The Client cache default is now CacheConfig(), with None switching it off.
  • Context.client_id is removed; use ctx.request_context.meta or get_access_token().client_id.
  • RFC7523OAuthClientProvider and JWTParameters are removed in favor of ClientCredentialsOAuthProvider, PrivateKeyJWTOAuthProvider, or IdentityAssertionOAuthProvider.
  • Client-credentials providers now take scope= instead of scopes=.
  • OAuthClientProvider timeout parameter is removed as it was unused.
  • message_handler receives only ServerNotification | Exception; the dead RequestResponder arm and mcp.shared.session module are gone.
  • FileResource.is_binary is replaced by an encoding field.
  • MCP_* environment variables for MCPServer are no longer advertised, and pydantic-settings is dropped from runtime dependencies.
  • Streamable HTTP servers reject request bodies over 4 MiB with HTTP 413.
  • clientInfo _meta key is optional, and serverInfo moved into every result's _meta.
  • stdio servers now decide the protocol era from the client's opening request, enabling 2026-era features over stdio.
  • stdio_server() isolates stdin/stdout to prevent print corruption of the JSON-RPC stream.
  • Tool results validated against an output schema are faster due to cached JSON Schema validators.

The stable v2 release is planned for 2026-07-28 alongside the spec release. Users are advised to pin exact versions until then.