Skip to content

Conversation

@agents-git-bot
Copy link

@agents-git-bot agents-git-bot bot commented Nov 21, 2025

Summary

This PR syncs documentation for cloudflare/agents PR #672: cloudflare/agents#672

Changes from original PR:

  • Introduces MCPConnectionState enum for type-safe connection states
  • Updates connection state handling to use enum constants
  • Improves error handling with fail-fast behavior using Promise.all
  • Refines connection flow and state transitions
  • Broadcasts MCP server state before and after OAuth connections

Documentation Updates

New Content

  • Changelog entry documenting the MCPConnectionState enum and its benefits
  • MCPConnectionState enum section in MCP Client API reference
  • Migration guide for transitioning from string literals to enum constants

Updated Content

  • Updated mcp-client-api.mdx to document the new enum with usage examples
  • Updated oauth-mcp-client.mdx to use enum constants in all code examples
  • Updated connection state type definitions to use MCPConnectionState type

Key Documentation Changes

  1. All code examples now use MCPConnectionState.READY instead of "ready"
  2. Added enum import statements to all TypeScript examples
  3. Documented all five connection states with their meanings
  4. Explained state transitions for OAuth and non-OAuth flows
  5. Provided before/after migration examples

Related

🤖 Generated with Claude Code

@github-actions github-actions bot added the product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. label Nov 21, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 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, @cloudflare/pcx-technical-writing

This documentation sync corresponds to PR #672 in cloudflare/agents:
cloudflare/agents#672

Changes:
- Document new MCPConnectionState enum for type-safe connection states
- Update all code examples to use enum constants instead of string literals
- Add migration guide for transitioning from string literals
- Document improved error handling with fail-fast behavior
- Create changelog entry for the release
- Update OAuth flow documentation with enum usage

The MCPConnectionState enum provides better type safety when working with
MCP server connection states (AUTHENTICATING, CONNECTING, DISCOVERING,
READY, FAILED).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@agents-git-bot agents-git-bot bot requested a review from a team as a code owner November 21, 2025 18:54
@agents-git-bot agents-git-bot bot changed the title docs: sync MCP client API changes from cloudflare/agents#672 docs: Add MCPConnectionState enum and update MCP documentation (sync PR #672) Nov 21, 2025
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.

5 participants