-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Upgrade MCP SDK to v1.25.1 #27314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Upgrade MCP SDK to v1.25.1 #27314
Conversation
This sync updates the documentation to reflect the following changes from cloudflare/agents PR #752: ## API Changes ### WorkerTransportOptions (mcp-handler-api.mdx) - Added `onsessionclosed` callback that fires when a session is closed via DELETE request - Added `eventStore` option for SSE resumability support, enabling clients to reconnect and resume using Last-Event-ID header - Added `retryInterval` option to control client reconnection timing for polling behavior - Added `closeSSEStream()` method to WorkerTransport class for implementing polling behavior during long-running operations - Updated `sessionIdGenerator` description to clarify it can return undefined for stateless mode ### MCPTransportOptions (mcp-client-api.mdx) - Added `connectionTimeoutMs` option (default: 15000ms) to prevent infinite hangs when connecting to MCP servers. Particularly useful when proxies strip SSE newline terminators. ### New Example (transport.mdx) - Added documentation for the new `mcp-server` example showing how to use `WebStandardStreamableHTTPServerTransport` from the MCP SDK directly without the agents package. This is the simplest way to create stateless MCP servers on Cloudflare Workers. Related PR: cloudflare/agents#752 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
This commit documents the new stateless MCP server approach introduced in PR #752 (Upgrade MCP SDK to v1.25.1). Changes: - Add new stateless-mcp-server.mdx guide demonstrating WebStandardStreamableHTTPServerTransport usage - Update MCP index page to explain both stateless and McpAgent-based approaches - Update remote-mcp-server guide to clarify it uses McpAgent and link to stateless option - Document the simplest way to create MCP servers on Cloudflare Workers The new example (examples/mcp-server) uses the MCP SDK directly without the agents package, providing a zero-config stateless option that is simpler for basic use cases. Related PR: cloudflare/agents#752
Documentation UpdatesAdded comprehensive documentation for the stateless MCP server approach introduced in cloudflare/agents#752: New Documentation
Updated Documentation
The new stateless approach is documented as "THE simplest way to get started with MCP on Cloudflare" and is ideal for servers that don't need to maintain state between requests. |
Document the MCP SDK upgrade from v1.23.0 to v1.25.1 with the following updates: - Add new section on using MCP SDK directly without Agents SDK - Document the new mcp-server example using WebStandardStreamableHTTPServerTransport - Add documentation for new WorkerTransport options: - onsessionclosed callback for session cleanup - eventStore for connection resumability support - retryInterval for SSE polling behavior control Related to cloudflare/agents#752 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Document new WorkerTransport features: eventStore, onsessionclosed, retryInterval - Highlight new mcp-server example with stateless guide - Explain improved error handling and migration notes Related to cloudflare/agents#752 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
CI run failed: build logs |
|
|
||
| :::note[Looking for a simpler stateless option?] | ||
| If you do not need state management and want the simplest possible MCP server, see the [Build a stateless MCP server](/agents/guides/stateless-mcp-server/) guide. That approach uses the MCP SDK directly without the `McpAgent` wrapper. | ||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this default?
Summary
Documents the upgrade of
@modelcontextprotocol/sdkfrom v1.23.0 to v1.25.1 in the Agents SDK.WebStandardStreamableHTTPServerTransportmcp-serverexample that provides the simplest way to create an MCP server on Cloudflare Workersonsessionclosedcallback for session cleanup notificationseventStorefor connection resumability support (allows clients to recover from interruptions)retryIntervalfor controlling SSE polling behaviorTest plan
Related PR: cloudflare/agents#752
🤖 Generated with Claude Code