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
runcommand 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
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:
- Comment 7's setup: authenticate through the server's setup flow (
npx @cloudflare/mcp-server-cloudflare initor the repo's setup steps), copy your account ID from the Cloudflare dashboard, then put this inmcp.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.
- Comment 8's simpler config, which uses a normal space-separated
argsarray:
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
initlogs in vianpx wrangler loginand stores credentials locally.-
A collaborator (comment 5) said Cursor's
commandMCP 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. -
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?- Comment 7's setup: authenticate through the server's setup flow (
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.Did this work for you?What @albertocavalcante tried on GitHub (Outcome unclear)
User explained that
initlogs in via wrangler and stores credentials, and gave a simpler Cursor config usingnpx -y @cloudflare/mcp-server-cloudflare run <account-id>. No confirmation it connected.Did this work for you?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.Did this work for you?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.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter got the custom
runcommand 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?