Skip to content

Releases: cloudflare/agents

[email protected]

08 Dec 17:36
58a4d8c

Choose a tag to compare

Patch Changes

  • #720 380c597 Thanks @mattzcarey! - MCP WorkerTransport accepts any supported protocol version in request headers and only rejects truly unsupported versions. This aligns with the move by MCP community to stateless transports and fixes an isse with 'mcp-protocol-version': '2025-11-25'

[email protected]

05 Dec 13:46
295f4dd

Choose a tag to compare

Patch Changes

  • #716 569e184 Thanks @whoiskatrin! - Fix elicitation response handling in MCP StreamableHTTP transport by adding a message interceptor

[email protected]

04 Dec 11:39
8f03865

Choose a tag to compare

Patch Changes

[email protected]

03 Dec 19:01
2c15bd1

Choose a tag to compare

Patch Changes

  • #696 6a930ef Thanks @mattzcarey! - Enables connecting to multiple MCP servers simultaneously and hardens OAuth state handling against replay/DoS attacks.

    Note: Inflight OAuth flows that were initiated on a previous version will not complete after upgrading, as the state parameter format has changed. Users will need to restart the authentication flow.

  • #702 10d453d Thanks @mattzcarey! - broadcast auth_url as soon as its returned

[email protected]

03 Dec 15:19
d7c12b0

Choose a tag to compare

Patch Changes

[email protected]

28 Nov 20:21
a3c1043

Choose a tag to compare

Patch Changes

[email protected]

28 Nov 20:21
a3c1043

Choose a tag to compare

Patch Changes

[email protected]

26 Nov 15:25
da2bb57

Choose a tag to compare

Patch Changes

[email protected]

26 Nov 22:24
f5ccde3

Choose a tag to compare

Patch Changes

[email protected]

26 Nov 15:25
da2bb57

Choose a tag to compare

Patch Changes

  • #673 603b825 Thanks @whoiskatrin! - added resumable streaming with minimal setup

  • #665 4c0838a Thanks @threepointone! - Add default JSON schema validator to MCP client

  • #664 36d03e6 Thanks @threepointone! - Refactor MCP server table management in Agent class

    Moved creation and deletion of the cf_agents_mcp_servers table from AgentMCPClientStorage to the Agent class. Removed redundant create and destroy methods from AgentMCPClientStorage and updated MCPClientManager to reflect these changes. Added comments to clarify usage in demo and test code.

  • #653 412321b Thanks @deathbyknowledge! - Allow this.destroy inside a schedule by including a destroyed flag and yielding ctx.abort instead of calling it directly
    Fix issue where schedules would not be able to run for more 30 seconds due to blockConccurencyWhile. alarm() isn't manually called anymore, getting rid of the bCW.
    Fix an issue where immediate schedules (e.g. this.schedule(0, "foo"))) would not get immediately scheduled.

  • #652 c07b2c0 Thanks @mattzcarey! - ### New Features

    • MCPClientManager API changes:
      • New registerServer() method to register servers (replaces part of connect())
      • New connectToServer() method to establish connection (replaces part of connect())
      • connect() method deprecated (still works for backward compatibility)
    • Connection state observability: New onServerStateChanged() event for tracking all server state changes
    • Improved reconnect logic: restoreConnectionsFromStorage() handles failed connections

    Bug Fixes

    • Fixed failed connections not being recreated on restore
    • Fixed redundant storage operations during connection restoration
    • Fixed potential OAuth storage initialization issue by excluding non-serializable authProvider from stored server options
    • Added defensive checks for storage initialization in MCPClientManager and DurableObjectOAuthClientProvider
    • Fixed initialization order: MCPClientManager is now created AFTER database tables are created to prevent possible table-not-found errors during DO restart
  • #678 cccbd0f Thanks @whoiskatrin! - convert internal AI SDK stream events to UIMessageStreamPart format

  • #672 7c9f8b0 Thanks @mattzcarey! - - MCPClientConnection.init() no longer triggers discovery automatically. Discovery should be done via discover() or through MCPClientManager.discoverIfConnected()

    Features

    • New discover() method on MCPClientConnection with full lifecycle management:
      • Handles state transitions (CONNECTED → DISCOVERING → READY on success, CONNECTED on failure)
      • Supports cancellation via AbortController (cancels previous in-flight discovery)
      • Configurable timeout (default 15s)
    • New cancelDiscovery() method to abort in-flight discoveries
    • New discoverIfConnected() on MCPClientManager for simpler capability discovery per server
    • createConnection() now returns the connection object for immediate use
    • Created MCPConnectionState enum to formalize possible states: idle, connecting, authenticating, connected, discovering, ready, failed

    Fixes

    • Fixed discovery hanging on repeated requests - New discoveries now cancel previous in-flight ones via AbortController
    • Fixed Durable Object crash-looping - restoreConnectionsFromStorage() now starts connections in background (fire-and-forget) to avoid blocking onStart and causing blockConcurrencyWhile timeouts
    • Fixed OAuth callback race condition - When auth_url exists in storage during restoration, state is set to AUTHENTICATING directly instead of calling connectToServer() which was overwriting the state
    • Set discovery timeout to 15s
    • MCP Client Discovery failures now throw errors immediately instead of continuing with empty arrays
    • Added "connected" state to represent a connected server with no tools loaded yet
  • #654 a315e86 Thanks @mattzcarey! - When handling MCP server requests use relatedRequestId in TransportOptions to send the response down a POST stream if supported (streamable-http)

  • #661 93589e5 Thanks @naji247! - fix: add session ID and header support to SSE transport

    The SSE transport now properly forwards session IDs and request headers to MCP message handlers, achieving closer header parity with StreamableHTTP transport. This allows MCP servers using SSE to access request headers for session management.

  • #659 48849be Thanks @threepointone! - update dependencies