Skip to main content
← Back to Articles
mcpcloudflarecursorideworkerssetup2026

Cloudflare MCP Server Setup for Cursor IDE (2026): Manage Workers from Chat

Connect Cursor IDE to Cloudflare's remote MCP servers to manage Workers, KV, R2, and DNS from your AI chat. No local install — setup via mcp-remote in under 5 minutes.

By Web MCP GuideApril 2, 20268 min read


Cloudflare MCP Server Setup for Cursor IDE (2026)

Cloudflare runs its MCP servers remotely rather than shipping them as local npm packages — you point Cursor at a hosted URL instead of running npx on your machine. This guide covers connecting the Workers Bindings server (the one most developers reach for first) and how to add the others Cloudflare offers.

What You Can Do with Cloudflare MCP in Cursor

Once connected:

  • "List my Workers and which ones deployed in the last 24 hours"

  • "Create a new KV namespace called SESSION_CACHE and bind it to my worker"

  • "Show me the R2 buckets in this account and their sizes"

  • "What environment variables are set on the production worker?"

  • "Tail the logs for my api-gateway worker and show me the last 10 errors"
  • The bindings server is the practical starting point because most Worker debugging involves checking what's actually bound and configured — rather than guessing from wrangler.toml.

    Why Cloudflare's MCP Servers Are Different

    Every other integration in this guide runs as a local process that Cursor spawns with npx. Cloudflare's don't — they're hosted services you connect to over Server-Sent Events (SSE), authenticated through an OAuth flow in your browser rather than a pasted API token. This has trade-offs: no local Node process to debug, but you're dependent on Cloudflare's endpoint being up, and the first connection requires a browser-based login rather than editing a config file and being done.

    Prerequisites


  • Cursor IDE v0.45 or later (older versions have inconsistent SSE/remote MCP support)

  • A Cloudflare account with at least one Worker, or willingness to create one

  • Node.js 18+ (needed for the mcp-remote bridge, even though the server itself is remote)
  • Step 1: Add the Remote Server to Cursor's Config

    Cursor's native MCP client doesn't yet speak raw SSE for every provider consistently, so Cloudflare's own docs recommend going through the mcp-remote bridge package. Open ~/.cursor/mcp.json:

    {
    "mcpServers": {
    "cloudflare-bindings": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://bindings.mcp.cloudflare.com/sse"]
    }
    }
    }

    mcp-remote runs locally and proxies stdio to the remote SSE endpoint — from Cursor's perspective it looks like any other local server.

    Step 2: Authenticate via Browser

    1. Restart Cursor completely after saving the config
    2. Open the AI chat and ask something that requires Cloudflare access, e.g. "List my Workers"
    3. A browser window opens asking you to log into Cloudflare and authorize the connection
    4. Approve it — the OAuth token is cached locally so you won't see this again unless it expires or you revoke access

    This is the part that trips people up coming from token-based setups: there's no field in the JSON config to paste a key into. If the browser window doesn't open automatically, check your terminal or Cursor's MCP output panel for a URL to open manually.

    Step 3: Verify the Connection

    List my Cloudflare Workers and their current status

    You should get back real Worker names and deployment info. If you get an auth error instead, the OAuth token likely didn't save — try removing and re-adding the server config to force a fresh login.

    Adding More Cloudflare MCP Servers

    The bindings server only covers Workers, KV, R2, and D1. Cloudflare exposes several other remote servers for different parts of the platform — add the ones you actually use rather than all of them, since each one is a separate OAuth grant and a separate entry in your MCP output panel to sort through when debugging:

    {
    "mcpServers": {
    "cloudflare-bindings": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://bindings.mcp.cloudflare.com/sse"]
    },
    "cloudflare-builds": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://builds.mcp.cloudflare.com/sse"]
    },
    "cloudflare-docs": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://docs.mcp.cloudflare.com/sse"]
    }
    }
    }

    cloudflare-builds gives visibility into deployment history and build logs; cloudflare-docs is a documentation lookup server, similar in spirit to Context7 but scoped to Cloudflare's own product docs — useful when your AI keeps suggesting deprecated Workers APIs.

    Practical Workflows

    Debugging a Failed Deploy

    My worker "api-gateway" deployment failed — check the build logs and tell me what broke

    Auditing Bindings Before a Refactor

    Show me every binding (KV, R2, D1, environment variables) on the "user-service" worker before I refactor its config

    Checking Production State Against Local Code

    Compare the environment variables set on the production worker against what's in my local wrangler.toml and flag any mismatches

    This last one catches a common failure mode: someone updates wrangler.toml locally but forgets to redeploy, or updates a binding in the dashboard and forgets to reflect it in source.

    Troubleshooting

    Browser auth window never appears
    Check Cursor's MCP output panel (View → Output → MCP) for a URL and open it manually. Corporate firewalls sometimes block the redirect.

    "Unauthorized" after previously working fine
    OAuth tokens expire. Remove the server entry, save, re-add it, and restart Cursor to trigger a fresh login.

    Server shows connected but returns empty results
    You're likely authenticated against the wrong Cloudflare account — if you have multiple accounts (personal + team), the OAuth flow logs into whichever one was active in your browser at the time. Log out of other accounts in-browser and reconnect.

    mcp-remote hangs on startup
    This is usually a stale cached token causing a redirect loop. Clear mcp-remote's local cache directory (check its README for the current path — it's changed between versions) and reconnect.

    Slow responses on large accounts
    Accounts with hundreds of Workers can be slow to enumerate. Scope your queries by name when possible instead of asking for "all my workers."

    Frequently Asked Questions

    Q: Do I need to install Wrangler (Cloudflare's CLI) for this to work?
    A: No. The MCP server talks to Cloudflare's API directly — Wrangler isn't required, though most people setting this up already have it installed for local Worker development.

    Q: Can I use API tokens instead of the OAuth browser flow?
    A: Cloudflare's hosted MCP servers are built around OAuth, not static tokens. If you need a fully headless, token-based setup (e.g., for CI), you'd be building against Cloudflare's REST API directly rather than through these MCP servers.

    Q: Does this work with Cloudflare Pages, not just Workers?
    A: The bindings server is scoped to Workers-adjacent resources (KV, R2, D1, Workers themselves). Pages-specific management isn't part of this server as of this writing — check Cloudflare's MCP server list for whether a dedicated Pages server has shipped since.

    Q: Is there a cost to using the Cloudflare MCP servers?
    A: The MCP connection itself is free. You're still billed normally for whatever Cloudflare resources you use or provision through it — creating a KV namespace via chat costs the same as creating one in the dashboard.

    Q: Can multiple people on my team connect to the same Cloudflare account this way?
    A: Yes, each person authenticates with their own Cloudflare login via OAuth, and permissions follow whatever role they have on the account. It's not a shared token, so access can be revoked per-person.

    Related Guides


  • Docker MCP Server Setup Guide (2026)

  • GitHub MCP Server: Cursor IDE Setup (2026)

  • Cursor IDE MCP Setup: Complete Guide (2026)

  • Best MCP Servers for Developers (2026)
  • ---