Cloudflare Agents SDK
A strong pick. 2nd of 9 MCP server frameworks.
Cloudflare's Agents SDK (`agents`) is a broad agent framework for Cloudflare Workers. Its MCP part, `createMcpHandler` plus OAuth helpers, is a fast way to put a remote MCP server on Workers. It only makes sense on Cloudflare, and its MCP API has already changed once: the stateful McpAgent class is now deprecated in favour of a stateless handler.
Best for: Teams that already deploy on Cloudflare Workers and want a remote, OAuth-protected MCP server with little setup.
Scores
Overall7.1
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
If you are on Cloudflare Workers, it is a strong, well-funded way to ship a remote MCP server with auth. For everyone else, the Workers lock-in rules it out. The recent McpAgent deprecation and 0.x churn also make it a less settled choice than the official MCP SDK or FastMCP. It ranks below those general-purpose options and is about level with mcp-handler as a platform-specific pick.
- blog.cloudflare.com/mcp-v2: Migration from McpAgent to createMcpHandler
- bex.co/blog/2026/09/13/cloudflare-agents-sdk-stateless-mcp-handler: The migration costs real work for stateful servers
- peers: The official SDK has 357M downloads in 4 weeks against 13M here
GPT-6.2 Sol: 7.7, likely 6.6 to 8.7
For a new stateless endpoint on Workers, the SDK is a strong pick because it handles the Workers request lifecycle and integrates with Cloudflare's OAuth tooling. The official MCP TypeScript SDK v2 is the better general default for portability and local stdio. The ongoing migration away from McpAgent and limited production evidence for the newest handler keep the recommendation specific to Workers.
- developers.cloudflare.com/agents/model-context-protocol/apis/handler-api: Documents the current Workers request handler and auth context.
- ts.sdk.modelcontextprotocol.io/v2: The official peer supports local stdio and multiple HTTP runtimes.
- developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2: Existing sessionful servers may need a staged migration and redesign.
- agentopsguide.com/mcp-server-frameworks: Independent hands-on comparison recommends the SDK for remote Workers endpoints.
Needed by many3.5
How many developers need a tool for this job?
Claude Opus 5.5: 3.5, likely 2.5 to 5.0
Building MCP servers is a growing but still specialised job, and this tool narrows it further to Cloudflare Workers. Only developers who host on Cloudflare need this take on it. The range is wide because Workers' share of new AI backends is hard to measure.
- project.note: Agent framework for Cloudflare Workers that also serves MCP
- chatforest.com/guides/mcp-serverless-deployment: Workers is one of several serverless targets for MCP
GPT-6.2 Sol: 3.5, likely 2.4 to 4.6
Exposing tools and data to AI agents is an established job, but this adapter serves the subset of JavaScript and TypeScript developers building remote endpoints on Workers. Enterprise surveys show production MCP use, while the share of developers who need to build and host their own server on Workers is harder to estimate.
- stacklok.com/wp-content/uploads/2026/01/State-of-MCP-in-Software-2026_FINAL.pdf: Nearly half of surveyed software enterprises reported some production MCP use.
- developers.cloudflare.com/agents/model-context-protocol/apis/handler-api: The adapter serves stateless HTTP requests on Workers.
- ts.sdk.modelcontextprotocol.io/v2: The official SDK also covers local stdio and other JavaScript runtimes.
Helps a lot7.2
How well does it do the job for those who need it?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
On Workers it gives remote Streamable HTTP, OAuth, scoped authorization, and state through Durable Objects. It also tracked the new stateless spec quickly. But users had to move from McpAgent to `createMcpHandler`, and stateful features such as pushed requests and streams need a redesign. The SDK also needs exact version pinning. A peer such as the official SDK or FastMCP is more portable and has fewer moving parts.
- blog.cloudflare.com/mcp-v2: createMcpHandler wraps the upstream stateless handler; spec supported from day one
- bex.co/blog/2026/09/13/cloudflare-agents-sdk-stateless-mcp-handler: Independent analysis of what the stateless move gains and costs
- developers.cloudflare.com/agents/model-context-protocol: Docs cover OAuth step-up scopes and tool schema guidance
- propelauth.com/post/cloudflare-worker-mcp-server: Third-party tutorial on a production MCP server built on createMcpHandler
GPT-6.2 Sol: 7.8, likely 6.8 to 8.8
Version 0.34.0 pairs a typed MCP SDK v2 server with Workers request handling and verified OAuth context. An independent test of 0.32.0 got a tool-level error for invalid input, and a developer reported that the wrapper resolved streaming hangs on Workers. Current examples make setup easier, but session replay still needs a legacy route or an application redesign. The available tests cover a small server, so production performance and coding-agent reliability remain less certain.
- github.com/cloudflare/agents/blob/agents@0.34.0/packages/agents/package.json: The release declares MCP server SDK 2.4.0 as an optional peer.
- developers.cloudflare.com/agents/model-context-protocol/guides/remote-mcp-server: Runnable Workers templates cover authenticated and public servers.
- developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2: Documents the migration for sessions, replay, and server-initiated requests.
- agentopsguide.com/mcp-server-frameworks: A small local test returned a tool error on bad input and reported 4.7 ms per call.
- reddit.com/r/CloudFlare/comments/1tf03i3/psa_mcp_servers_hanging_on_cloudflare_workers_use: A developer reported that the Workers handler resolved streaming hangs.
Holds up over time7.4
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Cloudflare funds it as a core product, and activity is very high: 1,284 commits, 341 releases and 78 contributors. Durability is held down by 0.x churn. The main MCP class was deprecated about 18 months after launch, and the rest of the API could change again. The project is tied to one vendor's strategy.
- github commitsLastYear / releasesLastYear: 1284 commits and 341 releases in the last year
- npm latestVersion: 0.34.0, still pre-1.0, with 102 versions in a year
- developers.cloudflare.com/agents/api-reference/mcp-agent-api: McpAgent marked deprecated and feature-frozen
- github closedIssues / openIssues: 759 closed vs 171 open issues
GPT-6.2 Sol: 7.8, likely 6.6 to 8.8
Cloudflare published 102 versions of the package in a year, uses the handler in its own MCP servers, and closed a user-reported OAuth documentation gap with a runnable example. Cloudflare backs the SDK as part of Workers, and the current handler follows the official protocol SDK. The McpAgent deprecation and a release that required existing servers to declare new peer dependencies show that upgrades can still take work.
- npm.versionsLastYear: The agents package shipped 102 versions, independent of sibling releases.
- github.com/cloudflare/mcp-server-cloudflare/blob/main/packages/mcp-common/README.md: Cloudflare's shared MCP server code uses the stateless handler.
- github.com/cloudflare/agents/issues/2124: A user-reported OAuth wiring gap was closed with documentation and a runnable example.
- github.com/cloudflare/agents/releases: A release required MCP servers to add explicit peer dependencies.
- developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2: Cloudflare documents a staged migration for sessionful servers.
Used widely5.6
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
Downloads rose from 0.44M to 13.3M per 4 weeks, about 30 times, far above the 4.1 median. Part of that comes from Cloudflare templates, CI installs and non-MCP agent use. The ecosyste.ms dependents count of 6 looks broken, probably because the old 2012 package name confuses it, so it tells us little. It is well behind the official SDK and close to tmcp and mcp-handler in downloads.
- npm downloadsLast4Weeks: 13.3M, up from 440k a year ago
- github stars: 6,019 stars, behind the official SDK and mcp-use
- dependents: 6 repos and 2 packages, likely undercounted
- bluesky posts: 10 posts, mostly launch posts and bot listings
GPT-6.2 Sol: 5.1, likely 3.3 to 6.8
Downloads grew 30.3 times year over year, well above the 4.1 times catalog baseline and faster than the official SDK v1 package or FastMCP for TypeScript. Automated installs and the SDK's other uses make it hard to assign this growth to MCP. The repository drew more Bluesky attention than FastMCP but less than the official SDK and mcp-use, while ecosyste.ms found only six repos and two packages in its partial index.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: 13.33 million versus 440,179 downloads, about 30.3 times year over year.
- peers, evidence.bluesky.posts, evidence.github.stars: Ten Bluesky posts and 6,019 stars cover the wider repository.
- evidence.dependents: Six indexed repos and two npm packages, with no comparable peer counts in the bundle.
- github.com/cloudflare/agents: The same package serves agent routing, scheduling, chat, and other uses.
Vouched for6.1
Who stands behind it being good?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
Cloudflare runs its own remote MCP servers on it and says partners tested the migration with production traffic. Auth vendors such as PropelAuth and Scalekit have written guides for it. Independent comparisons and survey data barely mention it, so most validation comes from the vendor.
- blog.cloudflare.com/mcp-v2: Customers and partners used the release candidate in production
- scalekit.com/blog/remote-mcp-server-hosting: Third-party hosting guide recommends createMcpHandler on Workers
- xmcp.dev/blog/best-mcp-server-frameworks: Framework roundups give Cloudflare only a passing mention
- hackerNews: 11 stories, all with low points and few comments
GPT-6.2 Sol: 6.7, likely 5.5 to 7.9
Sentry documents using the Agents SDK handler for its hosted MCP service, and Cloudflare uses the current handler in its own MCP servers. An independent hands-on comparison picked it for remote Workers deployments, and a separate developer verified an authenticated deployment end to end. Sentry documents an earlier handler API, and independent production evidence for the current version is still thin.
- github.com/getsentry/toolkit/blob/main/docs/releases/cloudflare.md: Sentry documents its hosted service's Agents SDK handler and OAuth setup.
- github.com/cloudflare/mcp-server-cloudflare/blob/main/packages/mcp-common/README.md: Cloudflare's own MCP servers delegate to the current stateless handler.
- agentopsguide.com/mcp-server-frameworks: Independent comparison tested eight frameworks and picked Cloudflare for Workers.
- github.com/cloudflare/agents/issues/2124: A developer verified the OAuth flow and tool call on a deployed Worker.
Safe7.3
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 5.5 to 8.0
It has an MIT licence and 11 dependencies, and Cloudflare publishes it. There were three moderate advisories in early 2026: two XSS bugs in the AI Playground and an email-routing IDOR. All were disclosed and fixed. There is no OpenSSF Scorecard, and the release rate is very high, which makes each release harder to review.
- advisories: 3 moderate advisories, all from February 2026
- npm dependencies: 11 direct dependencies
- scorecard: No Scorecard data
- npm license: MIT
GPT-6.2 Sol: 7.6, likely 6.4 to 8.6
The MIT-licensed package has 11 direct dependencies, and its tagged release workflow uses npm trusted publishing. The fixes for the reported moderate Playground and email-routing issues shipped by public disclosure. The current stateless handler validates browser origins. The missing OpenSSF Scorecard and unverified number of people with release access widen the range.
- npm.dependencies, npm.license, evidence.scorecard: Eleven direct dependencies, MIT licence, and no collected Scorecard.
- github.com/cloudflare/agents/blob/agents@0.34.0/.github/workflows/release.yml: The tagged release workflow requests an identity token for trusted publishing.
- evidence.advisories.recent: Three moderate reports cover the Playground and email routing.
- github.com/cloudflare/agents/releases/tag/agents@0.3.7: The email-routing fix shipped on February 3, the disclosure date.
- github.com/cloudflare/agents/releases/tag/agents@0.3.10: The Playground fix shipped on February 4, before the February 13 disclosures.
- developers.cloudflare.com/agents/model-context-protocol/apis/handler-api: The current handler validates present browser Origin headers.
Good
- Supported the new MCP specification (2026-07-28) and MCP SDK v2 from the day they shipped, with a Worker-friendly `createMcpHandler`.
- Fits with Cloudflare's OAuth Provider, Durable Objects, and storage such as D1 and KV, so auth and state need little glue code.
- Cloudflare staff build it full time, with about 1,300 commits and more than 300 releases in the last year.
- Downloads grew about 30 times year over year, far above the category median.
Bad
- It only runs on Cloudflare Workers, so you cannot move the server to another host.
- The McpAgent class, the recommended path in 2025, is now deprecated and feature-frozen, and stateful servers need a staged migration.
- It is still 0.x and ships very often, and it must be pinned to exact versions of the MCP SDK packages.
- MCP is a small part of a large agent framework, so you take on more API surface than an MCP-only library has.
The numbers
- npm downloads, 4 weeks
- 13M ×30 in a year
- GitHub stars
- 6k
- Commits, 12 months
- 1.3k
- npm version
- 0.34.0 Nov 2026
- Versions, 12 months
- 102
- Advisories, 24 months
- 3 of 3 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
An agent framework for Cloudflare Workers. It also serves MCP.
Read on 21 November 2026 from GitHub (cloudflare/agents), npm (agents), OSV and the OpenSSF Scorecard.
MCP server frameworks
- 8.7MCP TypeScript SDK
- 7.1Cloudflare Agents SDK
- 7.1mcp-use
- 7.1xmcp
- 7.0MCP Handler
- 6.8tmcp
- 4.9FastMCP (TypeScript)
- 4.0mcp-framework
- 3.5mcp-lite