Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

Summary

Document the new client capabilities persistence feature in WorkerTransport from cloudflare/agents PR #783.

Changes

Updated /agents/model-context-protocol/mcp-handler-api/ documentation to reflect:

  • New initializeParams field in TransportState interface that stores client capabilities, clientInfo, and protocolVersion
  • Automatic persistence and restoration of client capabilities across serverless restarts
  • Backward compatibility with older stored state that lacks the initializeParams field

Context

The original PR (cloudflare/agents#783) fixed a critical bug where client capabilities were not persisted in serverless environments. This caused features like elicitation to fail after Durable Object/Agent hibernation.

The fix ensures that when using WorkerTransport with persistent storage, client capabilities are:

  1. Captured during initialization
  2. Stored alongside session state
  3. Automatically restored by replaying the initialize request after restart

This documentation update makes developers aware of this behavior and the new fields in TransportState.

Related PR

Update documentation to reflect changes from cloudflare/agents PR #783:
- Add initializeParams field to TransportState interface
- Document automatic persistence and restoration of client capabilities
- Explain behavior in serverless environments (Durable Objects/Agents)
- Note backward compatibility with older stored state

Related to: cloudflare/agents#783
@github-actions github-actions bot added product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/s labels Jan 15, 2026
@github-actions
Copy link
Contributor

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

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

Update MCP handler API documentation to reflect that WorkerTransport now
persists and restores client capabilities across serverless restarts.

Changes:
- Document that client capabilities (elicitation, sampling) are persisted
- Update TransportState interface to show initializeParams field
- Add explanation of capability restoration mechanism
- Include backward compatibility note
- Add links to elicitation and sampling specifications

Related to cloudflare/agents#783

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants