modelcontextprotocol/python-sdk v2.1.0
Client accepts StdioServerParameters directly: Client(StdioServerParameters(command="uv", args=["run", "server.py"])) (#3321).
Key points
- Prompt messages accept Image and Audio, prompt functions may return bare content blocks, and Message / UserMessage / AssistantMessage are exported from mcp.server.mcpserver (#3320).
- The 4 MiB request body limit now also covers the SSE transport and the OAuth endpoints; SseServerTransport and MCPServer.sseapp() take maxrequestbodysize, and the SSE message endpoint answers 405 to non-POST requests (#3336).
- Raise ToolError / ResourceError when the message is meant for the model; those still reach the client and are logged at INFO without a traceback.
- TypedDict tool results: NotRequired keys are omitted instead of serialized as null, and registration no longer fails on Python 3.10 (#3224, #3227); recursive return types get an object-rooted outputSchema that pre-2026 clients accept (#3337).
Sources (1)
- [1]modelcontextprotocol/python-sdk v2.1.0GitHub: modelcontextprotocol/python-sdk · Aug 24, 07:00 PM
- `Client` accepts `StdioServerParameters` directly: `Client(StdioServerParameters(command="uv", args=["run", "server.py"]))` (#3321).
- Prompt messages accept `Image` and `Audio`, prompt functions may return bare content blocks, and `Message` / `UserMessage` / `AssistantMessage` are exported from `mcp.server.mcpserver` (#3320).
Extractive summary: sentences quoted from the sources.