Angaben zum Datum
Datum aus der Quelle.
Erstmals gesehen am .
Python SDK von Model Context Protocol
MCP Python SDK 2.3.0: Neue Optionen, httpx2 und strengere Tool-Prüfung
Das Python SDK 2.3.0 behebt überwiegend Fehler und bringt drei neue Optionen (u. a. max_sse_event_size), verlangt nun httpx2>=2.10.0, lässt Tools mit ungültiger x-mcp-header-Annotation bereits bei der Registrierung mit InvalidSignature scheitern und sendet leere _meta und params bei Verbindungen bis 2025-11-25 nicht mehr.
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.0 is 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-header annotation 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 _meta and params are 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. …