返回全部动态

MCP TypeScript SDK 发布 1.32.0:重定向同源限制与工具输入限制

原标题:1.32.0

MCP TypeScript SDK Releases一手来源开源质量 74

AI 摘要

MCP TypeScript SDK 发布 1.32.0 版本,主要变更包括:HTTP 客户端传输现在仅在同源(同协议、主机、端口,允许同主机 http 到 https)时跟随重定向,跨源重定向需显式配置 redirectPolicy: 'follow';新增默认关闭的 maxToolInputElements 选项以限制工具调用参数中的数组元素和对象成员数量,以及 requireBearerAuth 的 expectedResource 选项用于校验令牌受众。此外还修复了任务存储会话隔离、支持省略 arguments 的 tools/call 和 prompts/get 请求等问题。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

## Upgrade notes - Redirects: the HTTP client transports now follow a redirect only when it stays on the same origin (same scheme, host and port; http to https on the same host is allowed). A deployment whose endpoint redirects to another host or port either configures the final URL or sets redirectPolicy: 'follow' on StreamableHTTPClientTransport or SSEClientTransport. In browsers, a redirected request fails unless that option is set. - New options, both off unless you set them: maxToolInputE


发布时间:2026-10-03 01:28
抓取时间:2026-10-03 01:35
来源机构:MCP
阅读原文github.com