CapabilityWire
// event · sdk

MCP Python SDK v2.3.0: SSE size cap, subscription opt-out, HeaderMismatch retry

sdk
vendor: modelcontextprotocolpublished: 10d agoconfidence: 0.90id: 42ce925f-274a-48c7-9faf-d58aee06f3be

MCP Python SDK v2.3.0 adds max_sse_event_size on Streamable HTTP clients, an MCPServer(subscriptions=False) opt-out, a get_tool_input_schema hook for low-level servers, and one-shot client retry after a HeaderMismatch (-32020). Also stops counting interactive OAuth logins against request timeouts, rejects invalid x-mcp-header annotations at registration, and omits empty _meta/params/experimental fields on legacy connections.

capability delta

an agent can now cap SSE event size on Streamable HTTP, opt out of subscriptions, auto-retry tool calls after a HeaderMismatch, and run interactive OAuth logins without request timeouts expiring mid-flow.

curator note

Point release of the official MCP Python SDK. Mostly fixes but ships several agent-visible new options: max_sse_event_size, MCPServer(subscriptions=False), Server(get_tool_input_schema=...), and automatic retry on HeaderMismatch (-32020). Also tightens x-mcp-header validation at registration.

// install
pip install -U mcp==2.3.0
pypi · mcp @ 2.3.0
// example
python
from mcp.client.streamable_http import streamable_http_client
from mcp import ClientSession

# Raise SSE event size cap for large tool results (new in v2.3.0)
async with streamable_http_client(
    url="https://example.com/mcp",
    max_sse_event_size=8 * 1024 * 1024,  # 8 MiB, or None for unlimited
) as (read, write, _):
    async with ClientSession(read, write) as session:
        await session.initialize()
        # Client.call_tool now auto-retries once after a HeaderMismatch (-32020)
        result = await session.call_tool("search", {"q": "mcp"})
        print(result)
// links
mcppythonsdkstreamable-httpoauthsse
source: github_release · https://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.3.0