接入 API · 个人 AI 解读连接自己的模型解读资讯,浏览新闻无需配置。
返回资讯列表
Agent 与开发工具官方来源国际

MCP Python SDK 发布: v2.2.0

MCP Python SDK 发布 · 来源更新
今日摘要使用自己的 API,仅供个人查看

来源摘要

`pip install -U mcp`. Docs: https://py.sdk.modelcontextprotocol.io/ A few defaults changed in this release. If you run a server or client on 2.x, skim these first: ## Behaviour changes **HTTP client redirects are only followed within the endpoint's origin** (#3397) - `Client("https://...")`, `streamable_http_client` and `sse_client` follow a redirect only if it stays on the same scheme, host and port (or upgrades `http` to `https` on the same host). - A redirect anywhere else is not followed: the call fails with `MCPError` and the session stays usable (an SSE connect fails with `httpx2.HTTPStatusError`). If that other URL is the server you meant, use it as the endpoint URL. - The `follow_redirects` setting on an `httpx2.AsyncClient` you pass in is no longer used for MCP requests, so you don't need it for the trailing-slash redirect any more. - The OAuth providers apply the same rule to their own requests. **Idle Streamable HTTP sessions now expire (legacy <=2025-11-25 spec(** (#3395) - A stateful session with nothing in flight for 30 minutes is closed. The client's next request gets a 404 and it has to initialize again. - Clients that keep the GET stream open (the SDK's `Client` does) are not affected. Neither are stateless servers or 2026-07-28 connections. - A server also holds at most 10 000 sessions at once; beyond that, new sessions get a 503. - To turn either off: `mcp.run(transport="streamable-http", session_idle_timeout=None, max_sessions=None)` (also on `streamable_http_app()` and `run_streamable_http_async()`). **The OAuth client checks the authorization server's `issuer` on the legacy path too** (#3398) - For servers without protected resource metadata, authorization server metadata whose `issuer` isn't the server's own origin is now rejected with `OAuthFlowE

阅读原始来源
来源
MCP Python SDK 发布 · 官方来源
来源发布
2026/09/07 23:53
来源更新
2026/09/07 23:53
首次采集
2026/09/19 13:21

本文为公开信息索引与摘要,详情及后续变化请以原始来源为准。

把 AI 雷达放到桌面

在支持安装的浏览器中,可以将本站作为应用打开。

安装入口取决于浏览器;应用和网站使用同一份最新内容。

查看完整安装指南