Releases: cloudflare/agents
[email protected]
Patch Changes
- #720
380c597Thanks @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]
Patch Changes
- #716
569e184Thanks @whoiskatrin! - Fix elicitation response handling in MCP StreamableHTTP transport by adding a message interceptor
[email protected]
Patch Changes
-
#712
cd8b7fdThanks @whoiskatrin! - fix connection inside tool execution -
#710
d08612fThanks @whoiskatrin! - fix cachetll + test
[email protected]
Patch Changes
-
#696
6a930efThanks @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
10d453dThanks @mattzcarey! - broadcast auth_url as soon as its returned
[email protected]
Patch Changes
- #691
d7b2f14Thanks @whoiskatrin! - fixed schedule handling and added tests for this bug
[email protected]
Patch Changes
-
#681
0035951Thanks @threepointone! - update dependencies
[email protected]
Patch Changes
-
#689
64a6ac3Thanks @mattzcarey! - add patch to fix mcp sdk oauth discovery fallback to root domain for some servers (better-auth powered) -
#681
0035951Thanks @threepointone! - update dependencies -
#684
5e80ca6Thanks @threepointone! - fix: make agents cli actually run
[email protected]
[email protected]
Patch Changes
- #679
e173b41Thanks @whoiskatrin! - enhance request ID tracking and stream handling in useAgentChat
[email protected]
Patch Changes
-
#673
603b825Thanks @whoiskatrin! - added resumable streaming with minimal setup -
#665
4c0838aThanks @threepointone! - Add default JSON schema validator to MCP client -
#664
36d03e6Thanks @threepointone! - Refactor MCP server table management in Agent classMoved 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
412321bThanks @deathbyknowledge! - Allowthis.destroyinside a schedule by including adestroyedflag and yieldingctx.abortinstead of calling it directly
Fix issue where schedules would not be able to run for more 30 seconds due toblockConccurencyWhile.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
c07b2c0Thanks @mattzcarey! - ### New FeaturesMCPClientManagerAPI changes:- New
registerServer()method to register servers (replaces part ofconnect()) - New
connectToServer()method to establish connection (replaces part ofconnect()) connect()method deprecated (still works for backward compatibility)
- New
- 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
cccbd0fThanks @whoiskatrin! - convert internal AI SDK stream events to UIMessageStreamPart format -
#672
7c9f8b0Thanks @mattzcarey! - -MCPClientConnection.init()no longer triggers discovery automatically. Discovery should be done viadiscover()or throughMCPClientManager.discoverIfConnected()Features
- New
discover()method onMCPClientConnectionwith 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()onMCPClientManagerfor simpler capability discovery per server createConnection()now returns the connection object for immediate use- Created
MCPConnectionStateenum 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 blockingonStartand causingblockConcurrencyWhiletimeouts - Fixed OAuth callback race condition - When
auth_urlexists in storage during restoration, state is set to AUTHENTICATING directly instead of callingconnectToServer()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
- New
-
#654
a315e86Thanks @mattzcarey! - When handling MCP server requests use relatedRequestId in TransportOptions to send the response down a POST stream if supported (streamable-http) -
#661
93589e5Thanks @naji247! - fix: add session ID and header support to SSE transportThe 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
48849beThanks @threepointone! - update dependencies