Cloudflare MCP Server & CLI (navid.me) logo

Cloudflare MCP Server & CLI (navid.me)

Focused Cloudflare MCP and shared CLI with current DNS/Rulesets schemas, private profiles and reviewed mutation workflows.

Install Cloudflare MCP Server & CLI (navid.me)

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

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "thenavidm-cloudflare-mcp-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@thenavidm/cloudflare-mcp-cli@latest"
      ]
    }
  }
}

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

Claude Code command
claude mcp add --transport stdio thenavidm-cloudflare-mcp-cli -- npx -y @thenavidm/cloudflare-mcp-cli@latest

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 29 tools correctly ().

Overview

Tools29

What Cloudflare MCP Server & CLI (navid.me) lets your agent do. Expand a tool for its parameters.

Verified live~77.5k 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

Recent health check succeeded.

11/11 checks healthy over the last 45d

What it can do

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

Runs commands · 1Can delete or modify data · 11Handles credentials · 1Makes network requests · 26Read-only tools · 18
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age31 days
Maintainers1

Observed 2026-11-03 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 12d ago via OSV.dev · @thenavidm/cloudflare-mcp-cli@latest (npm)

Adoption & maintenance

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

npm downloads150Package downloads in the last 30 days.
Last commit29d 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 exposed29Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

Cloudflare

Cloudflare MCP Server & CLI

npm CI License YouTube X LinkedIn

Cloudflare MCP server and CLI for Codex and AI agents. 29 tools for current DNS, cache, zone settings, Rulesets, Worker metadata and read-only analytics, with private accounts and explicit operation approval. One shared implementation supplies both binaries and a desktop bundle.

Built and maintained by Navid Moazzez. Built on Slipway, which turns one definition of each tool into the MCP server and the CLI. The complete guide is on navid.me.

Illustrated workflow in the house terminal component

The terminal illustrates real command names and approval flow. It is not a recording of a provider account run. Cloudflare already has official CLI and hosted MCP products; their current schemas, approval policies and supported workflows are compared below.

Requires Node 22+ and eligible Cloudflare API access for account operations. Validation: fixture tests, schema validation and protocol/artifact discovery are separate from provider-account outcomes and desktop GUI outcomes, which remain unverified. Section 7 has the measured token costs; no success rate is invented.

Two ways to use it

Command line

Terminal
npm install -g @thenavidm/cloudflare-mcp-cli@latest
cloudflare-cli tools
cloudflare-cli list-zones --per-page 10 --agent
cloudflare-cli schema create-dns-record
cloudflare-cli create-dns-record --zone-id YOUR_ZONE_ID --payload-file /absolute/private/approved-dns.json --account work --confirm --agent

MCP server, for your AI app

bash
codex mcp add cloudflare -- npx -y @thenavidm/cloudflare-mcp-cli@latest

Configure private credentials first. Ask: “Read DNS for this exact zone; do not change any records.” Full setup is in INSTALL.md.

Which one

Where you workSurface
Codex or shell agentShared CLI, local MCP or both
Desktop chatCompatible local MCP or desktop bundle
Scripts / CICLI or MCP client
Remote-only client / broad APIOfficial Cloudflare hosted MCP / cf
Workers deploymentOfficial Wrangler / cf

Features

CapabilityCLIMCP
Zone/DNS readslist-zones / list-dns-recordslist_zones / list_dns_records
Explicit DNS changescreate-dns-record / update-dns-recordcreate_dns_record / update_dns_record
Exact DNS review/applypreview-dns-batch / apply-dns-batchpreview_dns_batch / apply_dns_batch
Rulesets and settingsget-zone-ruleset / get-zone-settingget_zone_ruleset / get_zone_setting
Bounded reads / analyticsquery-pages / analytics-queryquery_pages / analytics_query
Local schemas / previewsget-operation-schema / preview-operationget_operation_schema / preview_operation
Profiles and policylist-accounts / --account / --confirmlist_accounts / account / confirm

Contents

NumberSectionWhat it covers
1What you can ask itWhat you can ask it
2Quick installQuick install
3Set up Cloudflare accessSet up Cloudflare access
4Connect your clientConnect your client
5Check it worksCheck it works
6Output, flags and exit codesOutput, flags and exit codes
7MCP or CLI and token costMCP or CLI and token cost
8Every tool and argumentEvery tool and argument
9DNS, Rulesets, cache and analyticsDNS, Rulesets, cache and analytics
10Pagination, retries and local input filesPagination, retries and local input files
11Several private accountsSeveral private accounts
12Writing safelyWriting safely
13How the two surfaces workHow the two surfaces work
14Privacy and data handlingPrivacy and data handling
15Environment variablesEnvironment variables
16Updates and removalUpdates and removal
17TroubleshootingTroubleshooting
18API coverage and comparisonsAPI coverage and comparisons
19VersionsVersions
20FAQFAQ

1. What you can ask it

  • Read the intended zone's DNS records without changing anything.
  • Inspect the exact native schema for an A, AAAA, TXT, MX or other supported DNS request.
  • Preview a small reviewed DNS batch and submit only the same approved zone/profile/body.
  • Apply one explicit DNS edit or deletion after inspecting its record ID and content.
  • Read the selected zone setting, then change only the approved value.
  • Inspect current Rulesets and the selected phase entrypoint before approving a Ruleset change.
  • Purge only the requested cache targets after confirmation.
  • Query an eligible analytics dataset for an explicit time window without mutations.

Actual credential-free stdio discovery supplies 29 tools: 18 reads and 11 confirmation-gated mutations. Twenty-two native operations use a pinned, reviewed current REST schema; seven helpers provide local profile/schema/preview, bounded reads, DNS review/apply and query-only analytics. This is a focused management surface. It does not deploy Workers, expose an unrestricted raw API request or implement every Cloudflare product.

2. Quick install

Terminal
npm install -g @thenavidm/cloudflare-mcp-cli@latest
cloudflare-cli --version
cloudflare-cli tools
cloudflare-cli schema create-dns-record
cloudflare-cli login

Requires Node 22+ for manual installs. Configure private tokens before provider calls. Discovery and local previews work without provider authentication. See INSTALL.md for macOS, Windows, Linux, every supported local client, Docker and desktop extension setup.

3. Set up Cloudflare access

Private API tokens and resource access

  1. Choose the intended Cloudflare user/account and zone. Create a least-privilege API token through My Profile > API Tokens, or Manage account > Account API tokens for an account-owned token.
  2. Choose only the permissions needed below and restrict account/zone resources. Check optional expiry and IP filters. Save the secret privately outside every repository; never use the Global API Key with this Bearer-only package.
  3. Configure CLOUDFLARE_TOKEN_FILE as an absolute token-only file, or privately set CLOUDFLARE_API_TOKEN. Optional CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_ZONE_ID supply input defaults. A default does not restrict token permissions.
  4. Run cloudflare-cli doctor for local configuration checks. Deliberately run doctor --network to verify token status: user tokens use GET /user/tokens/verify; account-owned tokens need CLOUDFLARE_TOKEN_KIND=account and a private account ID, using GET /accounts/{account_id}/tokens/verify. Only an active result is accepted; token IDs/status bodies are not printed.
  5. Read the exact zone and DNS records, inspect the complete current input schema, preview the intended change locally and approve only the chosen request. A local preview does not verify provider permissions, conflicts or current remote state.

Requests use Authorization: Bearer on the fixed https://api.cloudflare.com/client/v4 origin. Token-kind selection changes the diagnostic route, not ordinary authorization or resource access. The wrapper does not implement OAuth login, refresh, saved official cf sessions, automatic .env loading or global CLI config ingestion. login prints instructions; it neither opens consent nor saves credentials.

User tokens inherit permitted user access. Account-owned tokens act as service principals; creation requires the provider's token-provisioning capability or Super Administrator role and grants cannot exceed the creator's permissions. Some products still have compatibility restrictions; verify the exact operation in the account-token compatibility documentation.

Reviews

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

Frequently Asked Questions about Cloudflare MCP Server & CLI (navid.me)

Cloudflare MCP Server & CLI (navid.me) is an MCP server that provides 29 tools for Cloudflare DNS, cache, zone settings, Rulesets, Worker metadata, and read-only analytics. It shares an implementation with a CLI and desktop bundle, supports private accounts and explicit operation approval, and is built for Codex and other AI agents.

Install Node 22+ and run `npm install -g @thenavidm/cloudflare-mcp-cli@latest`; then connect it to Codex with `codex mcp add cloudflare -- npx -y @thenavidm/cloudflare-mcp-cli@latest`. Configure private Cloudflare credentials before requesting account operations.

It supports zone and DNS reads, explicit DNS creation and updates, exact DNS batch previews and applications, Rulesets and zone settings, bounded page queries, analytics queries, Worker metadata, local operation schemas, and operation previews.

Yes. Cloudflare mutations use explicit operation approval, and the server supports private account profiles so an account can be selected for an operation. DNS changes include individual create or update tools and preview/apply workflows for exact batches.

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 PreviewCloudflare MCP Server & CLI (navid.me) AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/thenavidm-cloudflare-mcp-cli?style=directory)](https://allmcps.com/mcp/thenavidm-cloudflare-mcp-cli)
HTML Embed
<a href="https://allmcps.com/mcp/thenavidm-cloudflare-mcp-cli"><img src="https://allmcps.com/api/badge/thenavidm-cloudflare-mcp-cli?style=directory" alt="Cloudflare MCP Server & CLI (navid.me) on AllMCPs" /></a>