chore(deps): bump mcp from 1.25.0 to 2.3.0
Closed
DE
9d ago+406+406+012345678901234567890123456789-1584-1584-0123456789012345678901234567890123456789
Bumps mcp from 1.25.0 to 2.3.0.
Release notes
Sourced from mcp's releases.
v2.3.0
pip install -U mcp. Docs: https://py.sdk.modelcontextprotocol.io/Mostly fixes, plus three new options. A few things behave differently, so skim these first:
Behaviour changes
httpx2>=2.10.0is now required (#3600)
- It was
>=2.5.0. The newmax_sse_event_sizeoption needs it.- Nothing to do unless you pin
httpx2below 2.10.A tool with an invalid
x-mcp-headerannotation fails at registration (#3620)
@mcp.tool(),add_toolandTool.from_functionraiseInvalidSignature, naming the tool and the problem.- Until now the server started, and 2026-07-28 clients silently dropped the tool from their listing.
- Refused: anything other than a plain
str,intorboolparameter (so alsostr | None,float, lists and enums), a header name that isn't a valid token, and two names that differ only by case.- For an optional header parameter, give the schema directly:
Annotated[str | None, WithJsonSchema({"type": "string", "x-mcp-header": "Region"})] = None.Empty
_metaandparamsare no longer sent (#3628)
- On 2025-11-25 and earlier connections, 2.x sent
"_meta": {}on every request. Some servers reject that. It is now left out, as in v1.pingand list requests without a cursor go out with noparamsmember.- On the receiving side
ctx.metaisNonerather than{}, and middleware seesctx.paramsasNonefor a request without params.- 2026-07-28 connections are unchanged.
initializeleaves outexperimentalwhen none is configured (#3614)
- It used to send
"experimental": {}.server/discoveralready left it out.- Client code reading
capabilities.experimentalon a legacy connection should handleNone.
Mcp-Param-*validation looks the tool up by name (#3630)
MCPServerno longer runstools/listfor everytools/call, so middleware no longer sees that extra request.- The registered schema is what gets checked. Middleware that filters or rewrites
tools/listno longer affects it.An interactive OAuth login no longer counts against request timeouts (#3635)
- The timeout pauses while
OAuthClientProviderwaits onredirect_handlerandcallback_handler.- This fixes
Client(mode="auto")settling on2025-11-25when the login took longer than 10 seconds.- A request timeout no longer ends a login nobody finishes. Put a limit inside
callback_handlerif you need one.New
max_sse_event_size=onstreamable_http_clientandStreamableHttpParameters. The default stays 1 MiB per SSE event; raise it, or passNone, for larger tool results (#3600).MCPServer(subscriptions=False)stops servingsubscriptions/listenand advertiseslistChangedandsubscribeas false (#3626).Server(get_tool_input_schema=...)lets a low-level server supply a tool's schema for header validation without running itstools/listhandler (#3630).Client.call_toolre-lists the tools and retries once after aHeaderMismatch(-32020) rejection (#3627).Fixes
ctx: Context[AppState]works on prompts and resource templates, not only on tools (#3624).- An explicit
"structuredContent": nullis checked against the output schema instead of being treated as missing (#3621).- A
progress_callbackthat raises no longer fails the call on an in-processClient(server)(#3623).- Client OpenTelemetry spans record JSON-RPC error responses. With
mode="auto", connecting to a server withoutserver/discovernow shows oneERRORspan for the probe (#3629).stdio_clientresolves the executable off the event loop on Windows (#3510).
... (truncated)
Commits
2118f14docs: refresh translations for recent English changes (#3636)ed9b2d6Stop counting an interactive OAuth login against request timeouts (#3635)d5cebd1Keep inline-snapshot disabled when pytest runs in a terminal (#3634)c15566cLink What's new to the Header parameters page (#3632)4d29994Let a newer Deploy Docs run cancel the one in progress (#3633)0acea60Bump urllib3 from 2.7.0 to 2.8.0 (#3607)c54075cLook the tool schema up by name for Mcp-Param-* validation instead of running...9afccaeRetry a tool call once after a HeaderMismatch rejection (#3627)cafa33bRecord JSON-RPC error responses on the client OpenTelemetry span (#3629)0b2fd3eOmit an empty _meta and empty params from outbound requests (#3628)- Additional commits viewable in compare view
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.