MCP Catalogs
Home

mcp

by cloudflare·459·Score 53

Token-efficient MCP server for Cloudflare API with 2500 endpoints accessible via Code Mode.

developer-toolsops-infraweb-scraping
44
Forks
19
Open issues
this month
Last commit
2d ago
Indexed

Overview

This is a production-ready MCP server from Cloudflare that provides access to their entire Cloudflare API through a token-efficient Code Mode approach. Instead of exposing every API endpoint as a separate tool (which would require ~244k tokens), it uses code execution where the server executes JavaScript code to search the API spec and make calls, reducing token cost to just ~1k tokens. The server supports both OAuth and API token authentication methods, with special handling for GraphQL Analytics API endpoints.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Automating Cloudflare resource management through AI agents
you:CI/CD workflows for Cloudflare deployment and configuration
you:Interactive queries and analysis of Cloudflare analytics data
you:How does Code Mode reduce token usage?
you:What authentication methods are supported?

When to choose this

Choose this server when you need to interact with Cloudflare's extensive API ecosystem through an AI agent and want maximum token efficiency.

When NOT to choose this

Avoid if you need fine-grained control over each API endpoint as an individual tool (requires disabling Code Mode) or if you're not already using Cloudflare services.

Tools this server exposes

2 tools extracted from the README
  • search

    Query the Cloudflare API specification to find endpoints

  • execute

    Execute API calls to the Cloudflare API with discovered endpoints

Comparable tools

cloudflare-api-sdkserverless-mcpterraform-cloudflareraw-cloudflare-api

Installation

Installation

  1. Add to Claude Desktop:
{
  "mcpServers": {
    "cloudflare-api": {
      "url": "https://mcp.cloudflare.com/mcp"
    }
  }
}
  1. For API Token authentication:
{
  "mcpServers": {
    "cloudflare-api": {
      "url": "https://mcp.cloudflare.com/mcp",
      "bearerToken": "YOUR_CLOUDFLARE_API_TOKEN"
    }
  }
}
  1. Disable Code Mode (if needed):
{
  "mcpServers": {
    "cloudflare-api": {
      "url": "https://mcp.cloudflare.com/mcp?codemode=false"
    }
  }
}

FAQ

How does Code Mode reduce token usage?
Instead of exposing each of the 2500+ Cloudflare API endpoints as separate tools (which would require ~244k tokens), it uses code execution where the agent writes JavaScript to search the spec and execute API calls, reducing token cost to ~1k tokens.
What authentication methods are supported?
Both OAuth (recommended for users) and API tokens (for CI/CD or automated workflows) are supported. API tokens with Client IP Address Filtering enabled are not currently supported.

On Hacker News

Recent discussion from the developer community.

Compare mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.