Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

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

Documentation sync for cloudflare/agents PR #752

This PR synchronizes documentation for the MCP SDK upgrade from v1.23.0 to v1.25.2 implemented in cloudflare/agents#752

Changes

New Features Documented

  1. WorkerTransport Options

    • onsessionclosed - Callback for session closure via DELETE request
    • eventStore - Event store interface for message resumability support
    • retryInterval - SSE reconnection timing configuration
    • Updated sessionIdGenerator documentation to clarify stateless mode
  2. WorkerTransport Methods

    • closeSSEStream() - Method to trigger client reconnection for polling behavior
  3. New Example Approach

    • Added documentation for using WebStandardStreamableHTTPServerTransport directly from the MCP SDK
    • Shows how to build MCP servers without the Agents SDK for minimal setup
    • Links to new mcp-server example

Documentation Structure Improvements

  • transport.mdx: Now presents two clear approaches:

    • Option 1: Using Agents SDK with createMcpHandler (recommended)
    • Option 2: Using MCP SDK directly (minimal setup)
  • mcp-handler-api.mdx: Enhanced WorkerTransport documentation with:

    • Detailed examples for new options
    • Code samples for event store implementation
    • Practical use cases for polling behavior

Related Links

Testing

  • All documentation links resolve correctly
  • Code examples follow Cloudflare style guide
  • TypeScriptExample components are properly formatted
  • Cross-references between pages are accurate

@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

@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.

@agents-git-bot agents-git-bot bot requested a review from a team as a code owner December 29, 2025 16:11

:::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?

@agents-git-bot agents-git-bot bot changed the title Upgrade MCP SDK to v1.25.1 Upgrade MCP SDK to v1.25.2 Jan 9, 2026
This commit syncs documentation for cloudflare/agents PR #752 which upgrades
the MCP SDK to v1.25.2 and adds new transport features.

Changes:
- Add new example using MCP SDK directly in transport.mdx
- Document new WorkerTransport options (onsessionclosed, eventStore, retryInterval)
- Document new closeSSEStream method for polling patterns
- Add changelog entry for MCP SDK v1.25.2 upgrade
- Update API reference with enhanced error handling details

The upgrade brings improved error handling for transport detection and new
options for building stateful and stateless MCP servers.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@agents-git-bot
Copy link
Contributor Author

Updated documentation sync to include:

  • Changelog entry for MCP SDK v1.25.2 upgrade (2026-01-12-mcp-sdk-upgrade.mdx)
  • Comprehensive documentation for new WorkerTransport options (onsessionclosed, eventStore, retryInterval)
  • Documentation for the new closeSSEStream method for polling patterns
  • Added new example showing MCP SDK direct usage in transport.mdx

All documentation follows the Cloudflare style guide and includes practical code examples demonstrating the new features.

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