Cloudflare Workers logo
Developer ToolsAuth: OAuth

Cloudflare Workers MCP Server

Connect Cloudflare Workers to your AI agents with the Cloudflare Workers MCP server.

Updated

What is Cloudflare Workers MCP?

The Cloudflare Workers MCP server is a Model Context Protocol server that connects Cloudflare Workers to AI agents and assistants as a set of tools. With it connected, an agent can work with Cloudflare Workers (build workers apps with kv/r2/d1/ai) directly — instead of you copying data in and out by hand.

It is a remote MCP server that uses OAuth, so you point your client at the server URL, authorize once, and the Cloudflare Workers tools become available to the model.

Connect the Cloudflare Workers MCP server

Connect Cloudflare Workers MCP to Claude Code

  1. 1

    Add the server

    Use `claude mcp add` with the Cloudflare Workers MCP server URL (or its `npx` command), following the official docs.

  2. 2

    Authorize

    Complete authentication (OAuth) so Claude Code can call the server.

  3. 3

    Verify

    Ask Claude to use a Cloudflare Workers tool to confirm the connection is live.

Connect Cloudflare Workers MCP to Cursor

  1. 1

    Open MCP settings

    In Cursor, go to Settings → MCP → Add new server.

  2. 2

    Add Cloudflare Workers

    Provide the Cloudflare Workers MCP server URL or command and complete authentication.

  3. 3

    Test

    Reference Cloudflare Workers from chat to confirm Cursor can reach the tools.

Sample use cases

Using Cloudflare Workers MCP with Gamut

On Gamut, the Cloudflare Workers MCP server becomes a tool your agents use inside an automated, event-driven workflow — triggered by an event or a schedule, acting through Cloudflare Workers and your other connected MCP servers, with the connection managed by Gamut rather than a local config file.

Frequently asked questions

Can I deploy Workers directly from my AI agent?

Yes. The Cloudflare Workers MCP server supports creating and updating Worker scripts, so your agent can deploy code to the edge without the Cloudflare dashboard.

Does it support Workers KV and R2 storage?

Yes. You can perform CRUD operations on KV namespaces and R2 buckets through the MCP server, managing edge storage programmatically.

Can I manage DNS records through this MCP server?

Yes. The Cloudflare MCP server includes DNS record management — create, update, list, and delete records for any zone in your account.

Is this different from the Cloudflare Radar MCP server?

Yes. The Workers MCP server manages your Cloudflare account resources (Workers, DNS, storage). Radar is a separate read-only server for internet traffic intelligence data.

What Cloudflare plan is required?

Workers are available on all Cloudflare plans, including the free tier (100,000 requests/day). KV, R2, D1, and Pages may require paid plans for higher usage.

Can I manage multiple Cloudflare accounts?

The MCP server authenticates with one API token at a time. To manage multiple accounts, configure separate MCP connections with different tokens.

Does it support Cloudflare's D1 SQL database?

Yes. You can execute SQL queries, manage tables, and interact with D1 databases through the MCP server — bringing serverless SQL into your agent workflows.