@modelcontextprotocol/hono@2.0.1
MCP Hono adapter release v2.0.1 introduces request body size limits (default 4 MiB), a JSON-RPC batch limit of 100 messages, and ensures Host/Origin validation runs prior to body parsing.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
Patch release @modelcontextprotocol/hono@2.0.1 implements bounded request body reading across SDK-owned body reads (WebStandardStreamableHTTPServerTransport, createMcpHandler, toNodeHandler, and createMcpHonoApp's JSON pre-parse), enforcing a default 4 MiB limit before parsing and responding with 413 Payload Too Large. toWebRequest now rejects with RequestBodyTooLargeError (status 413) when reading exceeding streams. The size limit is configurable via maxRequestBodySize across relevant transport/handler options, and readRequestBody is exported for custom adapters. JSON-RPC batch requests are restricted to 100 messages max, rejecting larger arrays with HTTP 400 / code -32600. Furthermore, createMcpHonoApp and createMcpExpressApp now execute Host and Origin validation before parsing JSON bodies, returning 403 instead of 400 for forbidden hosts without reading the body. Dependency @modelcontextprotocol/server is bumped to v2.1.0.
可执行摘要
@modelcontextprotocol/hono@2.0.1 introduces a 4 MiB default limit for streamable HTTP bodies (returning 413 / RequestBodyTooLargeError), limits JSON-RPC batches to 100 messages (returning 400 / -32600), exports maxRequestBodySize configuration, and executes Host/Origin validation before body parsing (yielding 403 on invalid headers). Updates @modelcontextprotocol/server to 2.1.0.
- Agent 实用度
- 82/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Upgrade @modelcontextprotocol/hono to version 2.0.1 and ensure @modelcontextprotocol/server is aligned to 2.1.0.
- Configure maxRequestBodySize if payloads larger than the default 4 MiB are expected, updating both adapter and handler options accordingly.
- Handle RequestBodyTooLargeError if invoking toWebRequest directly, or provide a pre-parsed parsedBody.
- Ensure client JSON-RPC batch requests do not exceed the new maximum of 100 messages per request.