MCP TypeScript SDK 发布 express 2.0.1 补丁
原标题:@modelcontextprotocol/express@2.0.1
AI 摘要
MCP TypeScript SDK 发布 @modelcontextprotocol/express@2.0.1 补丁版本,为所有 SDK 自有的请求体读取引入默认 4 MiB 大小限制,超限时在解析前返回 413 Payload Too Large。同时将 JSON-RPC 批量数组限制为 100 条消息,超长批量返回 400/-32600 且不派发。新增 maxRequestBodySize 配置项,并调整 createMcpHonoApp 与 createMcpExpressApp 的 Host/Origin 校验顺序,使其先于 JSON 解析执行。
正文节选
### Patch Changes - [#2698](https://github.com/modelcontextprotocol/typescript-sdk/pull/2698) [`7b781ed`](https://github.com/modelcontextprotocol/typescript-sdk/commit/7b781ed4e25355a25d15974f3c76de81299694ed) Thanks [@maxisbey](https://github.com/maxisbey)! - Read Streamable HTTP request bodies with a size limit. Every SDK-owned body read — `WebStandardStreamableHTTPServerTransport` (and the Node transport built on it), `createMcpHandler`, `toNodeHandler`, and `createMcpHonoApp`'s JSON pre