Agent InfrastructureAutomated release watch

MCP Python SDK v2.1.0

MCP Python SDK v2.1.0 introduces StdioServerParameters support in Client, masks unhandled handler exceptions from clients, and updates content-block return behavior.

Human read

Why this signal matters

MCP Python SDK v2.1.0 brings several feature additions, behavioral modifications, and fixes. Key updates include allowing Client to accept StdioServerParameters directly, enabling Prompt messages to handle Image and Audio, and exporting Message types from mcp.server.mcpserver. A 4 MiB body limit is now enforced across SSE transport and OAuth endpoints. Behavior changes include masking unexpected handler exceptions behind generic messages to clients (reserving detailed messages for explicit ToolError/ResourceError raises) and altering tools annotated with content-block return types to avoid advertising outputSchema unless structured output=True is passed. Fixes address TypedDict serialization on Python 3.10, recursive return types, HTTP notification acknowledgments (202), and Windows non-ASCII config reading.

Agent parse

Actionable summary

MCP Python SDK v2.1.0 adds direct StdioServerParameters initialization to Client, changes unhandled handler exceptions to return generic errors rather than raw tracebacks (use ToolError/ResourceError instead), and omits outputSchema/structuredContent for content-block return annotations unless structured output=True.

Agent usefulness
77/100
Confidence
96%
Canonical data
JSON + Markdown
Next actions

What builders should check

  • Update tool, resource, and prompt handlers to raise ToolError or ResourceError if error details should be visible to models/clients.
  • Add structured output=True to tool definitions if you need structuredContent or outputSchema when returning content blocks (e.g., TextContent, Image, Audio).
  • Review custom SSE transport configurations to account for the new request body limits and non-POST 405 responses.
Classification

Tags and routing

mcpsdkpython
Related signals

Continue the thread