Workers Agents SDK, MCP Transport, and Agent Response Formats
What Cloudflare’s Agents SDK, MCP, Markdown for Agents, and codemode changelogs mean for building and operating agents on Workers.
This page summarises Cloudflare Developers changelog announcements that cluster around Agents SDK releases, Model Context Protocol (MCP) connectivity, Markdown for Agents, and the codemode rewrite. It is for engineers who already run agents on Workers and need to know which capabilities landed, what each release name implies, and which changelog entry to open for the full migration notes.
Agents SDK on Workers: what changed across 0.3.7–0.6.0
Section titled “Agents SDK on Workers: what changed across 0.3.7–0.6.0”The recurring theme in these entries is an agent runtime that wires together Workflows, MCP tool servers, chat UI packages, and stricter protocol handling—without assuming you run only in one JavaScript runtime.
Workflows integration, state, and scheduling (0.3.7)
Section titled “Workflows integration, state, and scheduling (0.3.7)”Cloudflare framed Agents SDK v0.3.7 around orchestration inside Workers:
Agents SDK v0.3.7: Workflows integration, synchronous state, and scheduleEvery()
— Cloudflare, Agents SDK v0.3.7: Workflows integration, synchronous state, and scheduleEvery()
In plain terms, that points to agents that can delegate long-running steps to Workflows, keep synchronous state for in-request consistency, and use scheduleEvery() for recurring agent work. If you operate agents that today poll or cron from an external scheduler, this release line is the hook to move timing closer to the agent process. Dashboard support for visualising those flows appears separately in Visualize your Workflows in the Cloudflare dashboard.
MCP security, OAuth, and billing protocol migration (0.4.0)
Section titled “MCP security, OAuth, and billing protocol migration (0.4.0)”The next milestone tightens how agents talk to MCP and related auth surfaces:
Agents SDK v0.4.0: Readonly connections, MCP security improvements, x402 v2 migration, and custom MCP OAuth providers
— Cloudflare, Agents SDK v0.4.0: Readonly connections, MCP security improvements, x402 v2 migration, and custom MCP OAuth providers
Readonly connections and MCP security improvements matter when tools exposed to a model should not mutate production data without an explicit path. Custom MCP OAuth providers signals first-class OAuth for MCP portals rather than ad‑hoc API keys. The x402 v2 migration mention is a breaking-change marker: upgrade notes in that post should be read before production deploys if you use x402-style paid tool access.
Protocol control, retries, and ai-chat (0.5.0)
Section titled “Protocol control, retries, and ai-chat (0.5.0)”Agents SDK v0.5.0 adds operator-level control over the agent wire protocol and ships a chat package alongside the core SDK:
Agents SDK v0.5.0: Protocol message control, retry utilities, data parts, and @cloudflare/ai-chat v0.1.0
— Cloudflare, Agents SDK v0.5.0: Protocol message control, retry utilities, data parts, and @cloudflare/ai-chat v0.1.0
Protocol message control and data parts are the levers you use when clients disagree on streaming shape or when you must strip or reshape sensitive fields before they reach the model. Retry utilities belong in the same bucket as MCP and upstream model flakiness. @cloudflare/ai-chat v0.1.0 is the UI/chat layer announced in the same release train—pair it with Agents SDK rather than bolting a separate chat stack if you want supported integration points.
RPC transport for MCP and optional OAuth (0.6.0)
Section titled “RPC transport for MCP and optional OAuth (0.6.0)”The latest named SDK step in this cluster emphasises MCP transport and schema hardening:
Agents SDK v0.6.0: RPC transport for MCP, optional OAuth, hardened schema conversion, and @cloudflare/ai-chat fixes
— Cloudflare, Agents SDK v0.6.0: RPC transport for MCP, optional OAuth, hardened schema conversion, and @cloudflare/ai-chat fixes
RPC transport for MCP suggests MCP sessions can run over an RPC-style path (often lower overhead and clearer lifecycle than ad‑hoc HTTP handlers in Workers). Optional OAuth complements the 0.4.0 custom provider work—useful when some MCP servers are public-internet and others are internal. Hardened schema conversion is the guardrail when tool JSON schemas are generated from TypeScript or OpenAPI and must not produce ambiguous tool definitions for the model.
| Release (changelog) | Headline capabilities named in the cluster |
|---|---|
| v0.3.7 | Workflows integration, synchronous state, scheduleEvery() |
| v0.4.0 | Readonly MCP connections, MCP security, x402 v2, custom MCP OAuth |
| v0.5.0 | Protocol message control, retries, data parts, @cloudflare/ai-chat |
| v0.6.0 | MCP RPC transport, optional OAuth, schema conversion, ai-chat fixes |
MCP on the edge: security, logging, and operations
Section titled “MCP on the edge: security, logging, and operations”MCP security and readonly tool access
Section titled “MCP security and readonly tool access”Security-related MCP wording appears from v0.4.0 onward (readonly connections, security improvements, OAuth). The operational pattern implied by these titles is: classify MCP tools by write capability, attach OAuth where identities matter, and keep readonly paths for retrieval-only tools so a compromised prompt cannot silently exfiltrate and mutate.
Export MCP server portal logs with Logpush
Section titled “Export MCP server portal logs with Logpush”For production MCP portals, Cloudflare added observability export:
Export MCP server portal logs with Logpush
— Cloudflare, Export MCP server portal logs with Logpush
That ties MCP portals into the same Logpush pipelines many teams already use for HTTP and security events. If you debug tool-call failures today only via client-side logs, this entry is the signal to correlate portal-side auth, routing, and tool invocation with your existing SIEM or object-store archives.
Sandboxes and interactive terminals (optional depth)
Section titled “Sandboxes and interactive terminals (optional depth)”Several sandbox changelog items in the same period (Interactive browser terminals in Sandboxes, Backup and restore API for Sandbox SDK, Docker-in-Docker support added to Containers and Sandboxes) are adjacent to agent development—useful when agents run code in isolated environments—but they are not Agents SDK API changes. Open those posts when your agent architecture includes remote execution rather than MCP-only tools.
Markdown for Agents: machine-oriented HTTP responses
Section titled “Markdown for Agents: machine-oriented HTTP responses”Introducing Markdown for Agents
Section titled “Introducing Markdown for Agents”Cloudflare announced a dedicated content format for automated clients:
Introducing Markdown for Agents
— Cloudflare, Introducing Markdown for Agents
Markdown for Agents is positioned as a way to serve documentation and site content in a shape agents can consume without brittle HTML parsing. It pairs with agent traffic controls and analytics work elsewhere in the same changelog window (for example Content Type Dimension for AI Bots in Cloudflare Radar).
Content encoding and follow-on improvements
Section titled “Content encoding and follow-on improvements”A later entry extends the same feature:
Content encoding support for Markdown for Agents and other improvements
— Cloudflare, Content encoding support for Markdown for Agents and other improvements
Content encoding support matters when agents fetch large markdown corpora: negotiated encodings reduce bytes on the wire and keep latency predictable for RAG-style retrieval in front of Workers AI or external models (Introducing GLM-4.7-Flash on Workers AI, @cloudflare/tanstack-ai, and workers-ai-provider v3.1.1 names additional model and provider packages in the same ecosystem).
Related serving behaviour for errors:
Markdown responses for Cloudflare 1xxx errors
— Cloudflare, Markdown responses for Cloudflare 1xxx errors
That suggests even edge error pages can return markdown understandable to an agent client—relevant when your agent crawls your own zone and must distinguish policy blocks from application failures.
codemode: runtime-agnostic agent execution modules
Section titled “codemode: runtime-agnostic agent execution modules”Agents SDK is not the only package in this thread. Cloudflare published a structural rewrite of codemode:
@cloudflare/codemode v0.1.0: a new runtime agnostic modular architecture
— Cloudflare, @cloudflare/codemode v0.1.0: a new runtime agnostic modular architecture
Runtime agnostic and modular architecture indicate codemode pieces should compose across Workers and other runtimes Cloudflare targets, rather than living in one monolithic bundle. If your agent executes generated code or structured “code actions,” this rewrite is the seam to audit imports and bundle boundaries when you pin @cloudflare/codemode alongside Agents SDK.
Worker platform headroom that affects agent designs
Section titled “Worker platform headroom that affects agent designs”Agent workloads are subrequest-heavy (models, MCP, RAG, webhooks). Two Worker changelog entries in this cluster matter for capacity planning even though they are not agent-specific:
Workers are no longer limited to 1000 subrequests
— Cloudflare, Workers are no longer limited to 1000 subrequests
No config? No problem. Just
wrangler deploy— Cloudflare, No config? No problem. Just
wrangler deploy
The subrequest change removes a common ceiling for tool-chaining agents. Wrangler autoconfig GA lowers friction for small agent Workers that previously stalled on wrangler.toml scaffolding. For day‑two operations, pair agent deploys with New Best Practices guide for Workers, the refreshed Workers Observability dashboard, and structured query language for Workers logs and traces when debugging tool latency.
Common mistakes when upgrading agent Workers
Section titled “Common mistakes when upgrading agent Workers”- Skipping the x402 v2 note in 0.4.0 while MCP tools still advertise legacy payment metadata—confirm v0.4.0 before mixed-version deploys.
- Enabling write-capable MCP tools everywhere when readonly connections exist precisely to limit blast radius.
- Assuming HTML documentation is agent-ready after Markdown for Agents ships—configure markdown routes and encodings per content encoding improvements.
- Ignoring portal-side logs and debugging only the model transcript—wire MCP portal Logpush before production traffic.
- Pinning only Agents SDK while chat UI drifts—track
@cloudflare/ai-chatfixes named in v0.6.0.
How to check this on your site
Section titled “How to check this on your site”-
Open each Agents SDK version post you have not yet applied—starting with v0.6.0 and walking backward through v0.5.0, v0.4.0, and v0.3.7—and list breaking changes (especially x402 and OAuth) against your
package.jsonpins. -
Deploy a staging Worker with wrangler autoconfig and exercise MCP tool calls until subrequest volume exceeds your old 1000-request mental model, using guidance from Workers are no longer limited to 1000 subrequests.
-
Request a documentation URL through your zone with an agent client and confirm whether Markdown for Agents and content encoding behave as expected; trigger a known
1xxxerror and inspect markdown error responses. -
In the Workers Observability dashboard, run a structured query from observability query language filtered on your agent Worker and MCP routes; if MCP portals are live, validate Logpush export receives portal events.
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match the linked Cloudflare changelog or you need a clarification on Agents SDK upgrades, email yimasynthetic@gmail.com with the page URL and the exact statement you are questioning.