← Back to directory
C

Cloudflare MCP Server

Official
Token-efficient access to the Cloudflare API.
GitHub source repository ↗
★ 765 Stars Category · Dev Tools Very popular Source revision 75c4dbc005e2
49FMRS · D
Reliability
8/20
Security and permissions
7/20
Maintenance
8/20
Documentation
13/20
Setup experience
13/20

The source identifies this as an official remote MCP server maintained by Cloudflare. It covers a large portion of the Cloudflare API while using Code Mode to reduce context usage. Configure Token permissions carefully before use.

Read the FMRS scoring method →

Cloudflare MCP Server provides access to the Cloudflare API through Code Mode and can search Cloudflare developer documentation. The API specification remains on the server while the agent writes JavaScript to search endpoints and execute API requests. Supported products include Workers, KV, R2, D1, Pages, DNS, Firewall, Load Balancers, Stream, Images, AI Gateway, Vectorize, Access, and Gateway.

Tools

docs
Search Cloudflare developer documentation.
search
Write JavaScript to query the API specification for endpoints.
execute
Write JavaScript to call the Cloudflare API, including the GraphQL Analytics API.

Setup

Add the provided JSON configuration to a client that supports remote HTTP MCP servers, then connect to https://mcp.cloudflare.com/mcp. On first connection, use OAuth to authorize and select permissions, or provide a Cloudflare API Token. API Tokens are suitable for CI/CD and automation. To expose individual endpoint tools, append ?codemode=false to the URL.

claude_desktop_config.json
{"mcpServers":{"cloudflare-api":{"type":"http","url":"https://mcp.cloudflare.com/mcp"}}}

Fit and risk

Best for

  • Developers and operators managing Cloudflare resources through an agent.
  • Users who need access to many Cloudflare API endpoints with low context usage.
  • CI/CD and automation workflows.

Not for

  • Users who do not use the Cloudflare API.
  • Users who require a locally run stdio server.
  • Users unable to grant the required Cloudflare permissions.

Required permissions

  • OAuth connections require Cloudflare authorization and selected permissions.
  • API Tokens must include the Cloudflare permissions required for the intended operations.
  • Account Tokens need Account Resources : Read to allow automatic account ID detection.

Risks and side effects

  • A Token with write permissions can create or modify Cloudflare resources through API operations.
  • Disabling Code Mode registers about 2,500 API endpoints as individual tools and substantially increases token cost.
  • API Tokens with Client IP Address Filtering enabled are currently unsupported.
  • An incorrect account ID or insufficient permissions can cause requests to fail or target the wrong account.

Troubleshooting

  1. Verify that the MCP URL is https://mcp.cloudflare.com/mcp.
  2. For OAuth, confirm that authorization was completed and the required permissions were selected.
  3. For API Tokens, verify the Token permissions; for automatic account ID detection with an Account Token, confirm Account Resources : Read is included.
  4. Confirm that Client IP Address Filtering is not enabled on the API Token.
  5. The user-token example requires account_id; Account Tokens can have the account ID auto-detected.
  6. Use ?codemode=false only when needed for composition with other Code Mode systems.

Use cases

List Workers.
Create a KV namespace.
Add an A record for a domain.
Query the Cloudflare GraphQL Analytics API.
Search Cloudflare developer documentation.

Supported clients

Supported clients have not been confirmed yet.