Cloudflare — Claude Code MCP server: what it does, how to install
Connects Cloudflare OpenAPI to your coding assistant to search endpoints and run JavaScript API requests.
no license 199 installs updated 2026-02-21
claude mcp add --transport http cloudflare https://cloudflare.run.toolsWhat Cloudflare does
This server runs at the remote endpoint https://cloudflare.run.tools. It exposes two tools: search and execute. The search tool navigates the OpenAPI specification with pre-resolved references. Covered areas include Workers, R2 storage, browser-rendering, and security rulesets.
The execute tool runs JavaScript against the Cloudflare API using cloudflare.request(). This helper handles GET, POST, PUT, PATCH, and DELETE calls. Execution follows a strict sequence. The assistant must look up the exact route via search before writing any request code.
What it helps with
- lookup routes in the Cloudflare OpenAPI specification
- run JavaScript queries via
cloudflare.request() - automate configuration for Workers and R2 storage
- inspect parameters for browser-rendering and security rulesets
Example prompts for the agent
- Search the Cloudflare OpenAPI spec for Workers endpoints
- Run a GET request with
cloudflare.request()to fetch current rulesets - Find available API routes for browser-rendering
How to install Cloudflare
Platform CLI: remote server
claude mcp add --transport http cloudflare https://cloudflare.run.toolsPlatform CLI: remote server
codex mcp add cloudflare --url https://cloudflare.run.toolsConfig file
{
"mcpServers": {
"cloudflare": {
"url": "https://cloudflare.run.tools"
}
}
}Config file
{
"servers": {
"cloudflare": {
"type": "http",
"url": "https://cloudflare.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http cloudflare https://cloudflare.run.toolsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Cloudflare
How to install Cloudflare in Claude Code?
Run claude mcp add --transport http cloudflare https://cloudflare.run.tools in your terminal. It adds the remote server using the HTTP transport.
What tools are included in the Cloudflare MCP server?
It provides search to scan OpenAPI definitions and execute to run JavaScript code against the Cloudflare API.
How does the server handle API calls?
You search for endpoints first. After locating the route, you execute JavaScript using cloudflare.request() with the target HTTP method and path.