A token-efficient MCP server for the entire Cloudflare API. 2500 endpoints in 1k tokens, powered by Code Mode.
| Approach | Tools | Token cost | Context used (200K) |
|---|---|---|---|
| Raw OpenAPI spec in prompt | — | ~2,000,000 | 977% |
| Native MCP (full schemas) | 2,594 | 1,170,523 | 585% |
| Native MCP (minimal — required params only) | 2,594 | 244,047 | 122% |
| Code mode | 3 | ~1,100 | 0.5% |
MCP URL: https://mcp.cloudflare.com/mcp
Just connect to the MCP server URL - you'll be redirected to Cloudflare to authorize and select permissions.
{
"mcpServers": {
"cloudflare-api": {
"type": "http",
"url": "https://mcp.cloudflare.com/mcp"
}
}
}For CI/CD, automation, or if you prefer managing tokens yourself.
Create a Cloudflare API token with the permissions you need. Both user tokens and account tokens are supported. For account tokens, include the Account Resources : Read permission so the server can auto-detect your account ID.
Note: API tokens with Client IP Address Filtering enabled are not currently supported.