• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    How to get mcp-server-cloudflare working in Cursor?

    I'm trying to add the Cloudflare MCP server (cloudflare/mcp-server-cloudflare) to Cursor. The run command works from the terminal with my account ID, but Cursor's MCP panel doesn't show the server. What should the mcp.json command/args look like so Cursor can connect?

    Originally asked on GitHub: https://github.com/cloudflare/mcp-server-cloudflare/issues/9

    6 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: the issue is closed as completed, but the thread never confirms a single config that fixed it. A collaborator suggested Cursor needs the full command as one string; a contributor later said this local setup may be outdated because Cursor supports remote MCP via mcp-remote.

      From the thread, the most concrete Cursor configs to try are:

      1. Comment 7's setup: authenticate through the server's setup flow (npx @cloudflare/mcp-server-cloudflare init or the repo's setup steps), copy your account ID from the Cloudflare dashboard, then put this in mcp.json:
      json
      {
        "mcpServers": {
          "cloudflare": {
            "command": "npx",
            "args": ["@cloudflare/mcp-server-cloudflare run <paste-account-id>"]
          }
        }
      }
      

      The user says you may need to refresh Cursor's MCP panel, and recommends Claude 3.7 because other models struggle to pick the right tools.

      1. Comment 8's simpler config, which uses a normal space-separated args array:
      json
      {
        "mcpServers": {
          "cloudflare": {
            "command": "npx",
            "args": ["-y", "@cloudflare/mcp-server-cloudflare", "run", "112365757565fjgiv5d8ea"]
          }
        }
      }
      

      This avoids needing the full path to the installed index.js. Comment 8 also notes that init logs in via npx wrangler login and stores credentials locally.

      1. A collaborator (comment 5) said Cursor's command MCP type expects the whole command and args as one string, for example: /path/to/workers-mcp run your-mcp-server-name https://your-server-url.workers.dev /path/to/your/project.

      2. If the MCP still won't connect, one user (comment 6) simply prompted Cursor to use the wrangler CLI directly.

      General advice (not from the thread): don't commit the local wrangler credentials file (on macOS it's ~/Library/Preferences/.wrangler/config/default.toml) or paste account IDs into shared configs.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @jorgecolonconsulting tried on GitHub (Outcome unclear)

      User posted a full Cursor setup: authenticate, copy account ID from the dashboard, use npx with args as a single string "@cloudflare/mcp-server-cloudflare run <account-id>", refresh the MCP panel, use Claude 3.7, and phrase prompts as "[ACTION] on cloudflare". No explicit success was reported.

      Source: https://github.com/cloudflare/mcp-server-cloudflare/issues/9#issuecomment-2746399129 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @albertocavalcante tried on GitHub (Outcome unclear)

      User explained that init logs in via wrangler and stores credentials, and gave a simpler Cursor config using npx -y @cloudflare/mcp-server-cloudflare run <account-id>. No confirmation it connected.

      Source: https://github.com/cloudflare/mcp-server-cloudflare/issues/9#issuecomment-2765225908 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @dinasaur404 tried on GitHub (Outcome unclear)

      A collaborator said Cursor expects the full command and args as one string for command-type MCP servers, e.g. /path/to/workers-mcp run name https://... /path. The reporter only said they'd try it.

      Source: https://github.com/cloudflare/mcp-server-cloudflare/issues/9#issuecomment-2688292028 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @rawwerks tried on GitHub (Outcome unclear)

      User found it easier to prompt Cursor to use the wrangler CLI instead of setting up the MCP server.

      Source: https://github.com/cloudflare/mcp-server-cloudflare/issues/9#issuecomment-2688736959 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reporter got the custom run command working with their ID from the terminal, but Cursor didn't show the Cloudflare MCP server.

      Source: https://github.com/cloudflare/mcp-server-cloudflare/issues/9 (opens external site)

      Did this work for you?

    Add your answer or comment