MCP Cloudflare logo

MCP Cloudflare

Manage Cloudflare zones, DNS, rules, and cache through a local MCP server using a scoped API token.

Install MCP Cloudflare

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-cloudflare": {
      "command": "uvx",
      "args": [
        "mcp-cloudflare-crunchtools"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 34 tools correctly (3d ago).

Overview

MCP Cloudflare MCP server connects an MCP-compatible client to Cloudflare for zone inspection, DNS management, Transform Rules, Page Rules, and cache purging. It runs locally over stdio with a Cloudflare API token supplied through the environment, or it can run in a container. Reach for it when an agent needs to inspect or change Cloudflare configuration while keeping the token on the local machine.

Use cases

  • List accessible Cloudflare zones
  • Manage DNS records for selected zones
  • Configure request and response header rules
  • Create and update Page Rules
  • Purge Cloudflare cache by URL or other target

Key features

  • Zone lookup by ID or domain
  • DNS record listing and mutation
  • Transform Rule management
  • Page Rule management
  • Targeted or full cache purging
  • Local stdio execution with token protection

Tools34

What MCP Cloudflare lets your agent do. Expand a tool for its parameters.

Verified live~4.9k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

6/6 checks healthy over the last 41d

What it can do

From the 34 tools this server returned when we ran it; 17 declare their own safety hints.

Can delete or modify data · 6Handles credentials · 1Makes network requests · 5Read-only tools · 28
Network at startup2 connections
Files written at startup30

Observed 2026-10-20 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · mcp-cloudflare-crunchtools (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit6d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed34Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Cloudflare works

What MCP Cloudflare does

The MCP Cloudflare MCP server exposes Cloudflare account and zone operations as MCP tools. It can list accessible zones and retrieve a zone by ID or domain name. For DNS, it supports listing and filtering records, retrieving individual records, and creating, updating, or deleting A, AAAA, CNAME, MX, TXT, NS, SRV, and CAA records.

The server also manages three groups of Cloudflare rules. Transform Rule tools cover request-header changes, response-header changes, and URL path or query rewrites. Page Rule tools list, create, update, and delete rules for functions such as redirects, cache settings, and SSL modes. A cache tool can purge by URL, tag, host, prefix, or all cached content.

How it works

The MCP Cloudflare MCP server communicates with an MCP client through local standard input and output. The client starts the Python command or container, and the server sends Cloudflare API requests using the token provided in CLOUDFLARE_API_TOKEN. The documented container image is quay.io/crunchtools/mcp-cloudflare.

Its security controls include environment-only token handling, secret-type storage, removal of tokens from errors, Pydantic input models, allowlisted record types and actions, strict identifier validation, a fixed Cloudflare API endpoint, TLS verification, request timeouts, and response-size limits. It is intended to run on Linux, macOS, and Windows.

Setup and configuration

Install with uvx mcp-cloudflare-crunchtools or install the mcp-cloudflare-crunchtools package with pip. A container deployment can pass the token to Podman and use the published image. The server requires a Cloudflare API token; the repository documents separate permission sets for read-only access, DNS-only administration, and full management.

For full feature access, the token needs zone read permission, DNS edit permission, Page Rules edit permission, Transform Rules edit permission, and Cache Purge access for the relevant zones. The token can be limited to all zones or selected zones, and Cloudflare also provides optional client-IP filtering.

Claude Code can register the command with claude mcp add, passing the token as an environment value and launching either the uvx command or the container. The token is shown only when created in Cloudflare, so it should be copied at that point and supplied through the environment rather than a file or command argument.

Tools and capabilities

The MCP Cloudflare MCP server provides 18 tools across five areas:

  • Zone management: list_zones and get_zone.
  • DNS records: list, get, create, update, and delete operations.
  • Transform Rules: list and set tools for request headers, response headers, and URL rewrites.
  • Page Rules: list, create, update, and delete operations.
  • Cache management: purge_cache with URL, tag, host, prefix, or full-cache targets.

The tool inputs are validated before requests are sent. DNS creation supports the record types documented by the project, while rule tools apply to the specific request-header, response-header, URL-rewrite, and Page Rule operations exposed by the server.

Limitations and notes

Operations are limited by the permissions and zone scope of the supplied Cloudflare token. A read-only token cannot perform DNS, rule, or purge mutations. The server is designed for local stdio use; the material does not describe a hosted deployment or third-party service relay. The project also publishes a container image and uses an AGPL-3.0-or-later license.

The repository describes automated dependency and CVE monitoring, but those checks do not replace careful token scoping. Grant only the Cloudflare permissions required for the agent's tasks.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Cloudflare

MCP Cloudflare is an MCP server that connects compatible AI clients to the Cloudflare API. Its main tools list and inspect zones, manage DNS records, configure Transform Rules and Page Rules, and purge cache by several target types. It runs locally over stdio and reads the API token from the environment.

Install it with `uvx mcp-cloudflare-crunchtools` or `pip install mcp-cloudflare-crunchtools`. You can also run `quay.io/crunchtools/mcp-cloudflare` with Podman and pass `CLOUDFLARE_API_TOKEN` into the container.

The required permissions depend on the operations you want to allow. Read-only use needs Zone read and DNS read; DNS management needs Zone read and DNS edit; full documented access additionally needs Page Rules edit, Transform Rules edit, and Cache Purge access.

Yes, MCP Cloudflare works with Claude Code through its `claude mcp add` command. Register either the `uvx` process or the Podman container and provide the API token as `CLOUDFLARE_API_TOKEN`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Cloudflare AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-cloudflare?style=directory)](https://allmcps.com/mcp/mcp-cloudflare)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-cloudflare"><img src="https://allmcps.com/api/badge/mcp-cloudflare?style=directory" alt="MCP Cloudflare on AllMCPs" /></a>