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

MCP Python SDK 发布: v2.1.0

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

来源摘要

## Highlights - `Client` accepts `StdioServerParameters` directly: `Client(StdioServerParameters(command="uv", args=["run", "server.py"]))` (#3321). - Prompt messages accept `Image` and `Audio`, prompt functions may return bare content blocks, and `Message` / `UserMessage` / `AssistantMessage` are exported from `mcp.server.mcpserver` (#3320). - The 4 MiB request body limit now also covers the SSE transport and the OAuth endpoints; `SseServerTransport` and `MCPServer.sse_app()` take `max_request_body_size`, and the SSE message endpoint answers 405 to non-POST requests (#3336). ## Behaviour changes to be aware of - Handler exceptions (#3314): an unexpected exception from a tool, resource or prompt handler is logged once at ERROR with its traceback, and the client now sees only `Error executing tool ` (or the resource/prompt equivalent) rather than the exception text. Raise `ToolError` / `ResourceError` when the message is meant for the model; those still reach the client and are logged at INFO without a traceback. - Content-block return annotations (#3320): a tool annotated to return `TextContent`, `EmbeddedResource`, `Image`, `Audio`, or lists/unions of them no longer advertises `outputSchema` or returns `structuredContent`; its `content` is unchanged. Pass `structured_output=True` to keep the previous shape. ## Fixes - TypedDict tool results: `NotRequired` keys are omitted instead of serialized as `null`, and registration no longer fails on Python 3.10 (#3224, #3227); recursive return types get an object-rooted `outputSchema` that pre-2026 clients accept (#3337). - 2026-07-28 over HTTP: a POSTed notification such as `notifications/cancelled` is acknowledged with 202 instead of rejected with 400 (#3324). - Pre-2026 sessions ignore cache-hint fields from later revisions i

阅读原始来源
来源
MCP Python SDK 发布 · 官方来源
来源发布
2026/08/25 03:00
来源更新
2026/08/25 03:00
首次采集
2026/09/19 13:21

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

把 AI 雷达放到桌面

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

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

查看完整安装指南