返回全部动态
MCP Python SDK v2.2.0 发布:安全与稳定性增强
原标题:v2.2.0
AI 摘要
MCP Python SDK 发布 v2.2.0 版本,主要变更包括:HTTP 客户端重定向仅限同源、空闲 Streamable HTTP 会话默认 30 分钟过期并限制最大并发会话数、OAuth 客户端在旧路径也校验授权服务器 issuer、新增两个弃用警告。新功能包括 AuthSettings.validate_token_resource、issuer 参数和会话超时/上限配置。修复了会话释放和工具输出 schema 引用解析问题。
以上摘要由 AI 生成,可能存在误差。事实请以原文为准。
正文节选
`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 f
发布时间:2026-09-07 23:53
抓取时间:2026-09-08 00:04
来源机构:MCP