Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Dec 24, 2025

Summary

Documents the upgrade of @modelcontextprotocol/sdk from v1.23.0 to v1.25.1 in the Agents SDK.

  • Added new section demonstrating how to use MCP SDK directly without the Agents SDK using WebStandardStreamableHTTPServerTransport
  • Documented new mcp-server example that provides the simplest way to create an MCP server on Cloudflare Workers
  • Created comprehensive stateless MCP server guide with step-by-step tutorial
  • Added documentation for new WorkerTransport options:
    • onsessionclosed callback for session cleanup notifications
    • eventStore for connection resumability support (allows clients to recover from interruptions)
    • retryInterval for controlling SSE polling behavior
  • Added changelog entry documenting all v1.25.1 features and migration notes

Test plan

  • Review documentation accuracy against the source code changes
  • Verify all links and code examples are correct
  • Ensure the new example is properly integrated into the documentation structure
  • Confirm changelog entry follows existing format and style

Related PR: cloudflare/agents#752

🤖 Generated with Claude Code

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>
@github-actions github-actions bot added size/m product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. labels Dec 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

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
@agents-git-bot
Copy link
Contributor Author

Documentation Updates

Added comprehensive documentation for the stateless MCP server approach introduced in cloudflare/agents#752:

New Documentation

  • Build a stateless MCP server guide - Complete tutorial showing the simplest way to create MCP servers using WebStandardStreamableHTTPServerTransport directly from the MCP SDK

Updated Documentation

  • MCP index page - Now clearly explains both approaches (stateless vs McpAgent-based) and helps users choose the right one
  • Build a Remote MCP server guide - Added note clarifying this is for McpAgent-based servers and linking to the stateless option for simpler use cases

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>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2025

- 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>
@agents-git-bot agents-git-bot bot requested a review from a team as a code owner December 29, 2025 16:11
@github-actions
Copy link
Contributor

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.
:::
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants