Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Additional UpdatesPushed additional improvements to the documentation:
The migration guide provides clear before/after examples to help developers update their existing implementations. |
MCP SDK 1.26.0 introduces a guard that prevents connecting to a server instance that has already been connected to a transport. This fixes a security vulnerability (CVE) where sharing server or transport instances could leak cross-client response data. Updated all stateless MCP server examples to create new server instances per request instead of sharing a single global instance. This affects: - mcp-handler-api.mdx: Added breaking change notice and updated example - transport.mdx: Updated both unauthenticated and authenticated examples - chatgpt-app.mdx: Refactored to use createServer() function pattern Refs: cloudflare/agents#848 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
7851da0 to
6dfdcc4
Compare
- Add security vulnerability warning and migration guide for MCP SDK 1.26.0 - Update stateless MCP server examples to create new McpServer instances per request - Document the CVE fix that prevents cross-client response leakage - Include before/after code examples and comparison table - Add guidance for raw SDK transport users Related to cloudflare/agents#848 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
/bonk review this. fix any build issues present. |
Review SummaryNo build issues found in this PR. The three changed MDX files compile cleanly through the Astro/Vite build. The only build failure encountered ( Files reviewedAll three files are clean - no fixes needed:
Internal links verifiedAll internal links in the changed files resolve to existing pages:
Content qualityThe changes are consistent and correct - every stateless MCP server example across all three files has been updated to use the factory function pattern to avoid the CVE-2025-27098 cross-client response leakage vulnerability. |
Summary
This PR documents the breaking changes introduced in MCP SDK 1.26.0, which fixes a critical security vulnerability (CVE) where responses from one client could leak to another client when using shared server or transport instances in stateless MCP servers.
Changes Made
McpServerinstances per requestBreaking Change Details
Who is affected:
createMcpHandlerwith globalMcpServerinstancesWho is NOT affected:
Agent/Durable Object (these create instances per agent already)Required Action:
Developers must update their code to create new
McpServerinstances per request instead of sharing a single global instance.Related
🤖 Generated with Claude Code