mcp-server-cloudflare
mcp-server-cloudflare copied to clipboard
anyone able to get this to work in cursor?
i can get the custom run command working with my id, but i can't seem to get cursor to see the cloudflare mcp
I did your still in the dspy discord this is batman
@jmanhype I'm also interested. Could you share your solution here? 🙏
@jmanhype batman to the rescue!
what's the secret?
Any updates on that? 👀
Hey! To get your Cloudflare MCP server working in Cursor, you need to combine the 'command' and 'args' from your config file into a single string and use type 'command'. For example, if your config file looks like:
{ "mcpServers": { "your-mcp-server-name": { "command": "/path/to/workers-mcp", "args": [ "run", "your-mcp-server-name", "https://your-server-url.workers.dev", "/path/to/your/project" ], "env": {} } } }
In Cursor, create an MCP server entry with type: command and "/path/to/workers-mcp run your-mcp-server-name https://your-server-url.workers.dev /path/to/your/project"
Let me know if that works for you!
thanks for this suggestion, i will give it a try.
for any others struggling, i've found it easier to prompt cursor to use the wrangler cli.
- Authenticate your MCP server https://github.com/cloudflare/mcp-server-cloudflare?tab=readme-ov-file#setup
- Log into Cloudflare's website and copy the account ID
- Edit mcp.json as such
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": [
"@cloudflare/mcp-server-cloudflare run <paste-account-id>"
]
}
}
}
- Cursor MCP panel should look like this. Might need to hit refresh to connect.
- Use Claude 3.7, looks like most other models struggle to choose the right tools.
- I've had success structuring my prompt as "[ACTION I WANT TO HAPPEN] on cloudflare".
Adding to this thread
When you run npx @cloudflare/mcp-server-cloudflare init, it will login to Cloudflare using the wrangler CLI via npx wrangler login and host the credentials at the path according to the OS.
for macOS:
cat "~/Library/Preferences/.wrangler/config/default.toml"
On Claude by default it does this setup:
"cloudflare": {
"command": "/opt/homebrew/bin/node",
"args": [
"~/.npm/_npx/384319a4c8dff50b/node_modules/@cloudflare/mcp-server-cloudflare/dist/index.js",
"run",
"112365757565fjgiv5d8ea"
]
}
but you can simply have:
"cloudflare": {
"command": "npx",
"args": [
"-y",
"@cloudflare/mcp-server-cloudflare",
"run",
"112365757565fjgiv5d8ea"
]
}
This shouldn't be relevant anymore due to moving to remote MCP servers. All of our servers should be compatible with cursor via mcp-remote. If you run into issues, please let us know which servers have issues.