The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the AMH Cloudflare Ops MCP by WT listing page.
-/\-\ M H // WT
WT WALRUS TUSK
🦣 Walrus Tusk home · FAQ · Docs
An approval-gated Cloudflare operations suite with an optional private Agent Harness: bounded delegation, deterministic verification, OAuth-isolated MCP tools, and verified deploy checks without handing agents raw account credentials.
Latest update - v0.5.3: the owner-supplied WT Connected OAuth setup UI is now the only success-page renderer. Every release runs it in Chromium under the production security policy and verifies the WT/AMH identity, all four copy controls, phone layout, images, and legacy-link removal. See the latest release.
Cloudflare Ops MCP scans Cloudflare configuration, computes a diff of desired vs current DNS / Email Routing / BIMI / DMARC / SPF / Pages / cache / Turnstile setup, and applies fixes only after explicit approval. It is built for people who want an AI agent to help with Cloudflare safely: scan first, show the plan, then write only when the owner approves.
Version 0.5.3 works five ways:
cfops locally with a scoped Cloudflare token.cfops_ connector key. The owner's API token is never shared.agent/ Worker behind the MCP Worker's AGENT_HARNESS service binding for bounded jobs, health watches, schedules, audit, and the authenticated operator console at console.artificialmindhive.com/console.For repository-connected deployments, see GIT-INTEGRATION.md. The recommended route uses Cloudflare Workers Builds' GitHub App authorization; the MCP does not store a GitHub token.
Machine discovery is available at robots.txt, sitemap.xml, llms.txt, and walrus-tusk.md. These describe the public landing and documentation; authenticated MCP and OAuth callback routes remain excluded from crawling.
Cloudflare Ops MCP is especially useful for Cloudflare operators who need repeatable DNS hygiene across many zones: SPF cleanup, DMARC enforcement, BIMI records, MX checks, DKIM discovery, Cloudflare Email Routing, TXT verification records, safe DNS upserts, and audit logs for every approved write.
Unofficial Cloudflare tool. Cloudflare Ops MCP is made by AMH - Artificial Mind Hive, operated by Service Pricer LLC. It is independent, third-party, open-source software. It is not affiliated with, endorsed by, sponsored by, or made by Cloudflare, Inc. "Cloudflare" and "Wrangler" are referenced only to describe compatibility with Cloudflare's platform and official developer tooling. You are responsible for every DNS, Email Routing, DMARC, BIMI, SPF, or Worker change you approve and apply.
No owner's API key in Git or in your client. Public users authorize Cloudflare directly. OAuth access and refresh tokens stay server-side in KV; the connector key is stored only as a SHA-256 hash and is bound to one OAuth grant.
Cloudflare Ops MCP is focused on the Cloudflare tasks that regularly break launches, email trust, bot checks, cache freshness, brand display, and AI-agent workflows:
This is not meant to replace every Cloudflare feature. It is the narrow, safe lane for common Cloudflare ops an operator or AI agent should be allowed to do.
The examples below are intentionally direct. They are not toy examples. They show the exact dry-run -> review -> apply pattern users should follow when fixing real domains.
Use this when an old registrar, parking page, Vercel app, HugeDomains page, or stale A/AAAA records are blocking a Cloudflare Pages custom domain.
Dry-run first:
Apply only after reviewing the delete/create plan:
What it changes:
--wildcard.Options:
--no-www only cuts over the apex domain.--wildcard also removes conflicting *.example.com A/AAAA/CNAME records.Wrangler is Cloudflare's official developer CLI. Cloudflare Ops MCP can run without Wrangler as a local CLI/library, but Wrangler is the right path when you want a remote MCP server because it deploys the Worker, stores secrets, tails logs, and manages Cloudflare bindings from the same toolchain Cloudflare documents.
Use Wrangler when you want:
|
Agent-safe Cloudflare writes Cloudflare Ops MCP keeps the write path narrow: scan the target, show the diff, wait for explicit approval, then apply only the requested DNS, DMARC, BIMI, SPF, Email Routing, Pages, cache, or Turnstile change. |
|
Per-user OAuth isolation Public users connect their own Cloudflare account and receive an opaque |
|
Email trust diagnostics The scanner reports SPF, DKIM discovery, DMARC policy, BIMI readiness, MX records, and Cloudflare Email Routing status so an agent or operator can see what is missing before touching production DNS. |
|
Other highlights
|
{ apply: true } is passed. The CLI is dry-run unless you
add --apply. A dry-run returns the planned change plus a before/after
diff and writes nothing.deleteDnsRecord(..., { confirm: true }) call (CLI: --force). An apply
never deletes anything.process.env.CLOUDFLARE_API_TOKEN. It is never logged, never written to the
audit log, and never included in thrown error messages - any token-looking
substring is redacted defensively.setupBimi first checks the domain's DMARC policy. If
p is missing or none, it refuses to write in apply mode (BIMI is not
honored below enforcement) unless you pass { force: true }. In dry-run it
warns../cloudflare-ops-mcp-audit.log) with
{ ts, action, domain, record, before, after } - never the token.For the fastest path, start with SETUP.md. It explains the CLI path, the Wrangler-hosted MCP path, and how users provide their own Cloudflare credentials safely. See PHASES.md for the rollout model, OAUTH.md for hosted Cloudflare OAuth, and ROADMAP.md for the next upgrades.
initialize and tools/list automatically—users do not need to memorize tool names.Example prompts:
The agent chooses the appropriate MCP tool from its schema. Read-only calls run immediately. Mutation tools return a dry-run diff unless the caller explicitly sends apply: true; users should approve only after reading that diff.
Current v0.5 tools cover DNS, email authentication/routing, Pages cutover, cache purge, Turnstile, token operations, and account diagnostics — plus the AMH WT Agent Harness (agent/): a private companion Worker for bounded research, verification, UI checks, and zero-AI site-health watches. Fourteen native process folders under skills/ are selected automatically and recorded in each job packet, covering safe deploys, live verification, landing restore, mail verification, context handoff, security review, private MCP access, source research, NU publishing, operator context, error detection, and optional Claude review. One Durable Object per user keeps a tamper-evident audit chain, friendly reusable agent profiles, a Continuity Keeper briefing with automatic 4/7/30-day retention, daily model-call limits, schedules, and candidate revisions that never self-apply. The default Free profile uses JSON-mode-compatible @cf/meta/llama-3.1-8b-instruct-fast in separate primary and verifier passes; @cf/moonshotai/kimi-k2.6 is an explicit Workers Paid or eligible prepaid-credit profile. The authenticated AMH console and optional local dashboard show live handoffs, names, skills, limits, alerts, and exact recorded model calls without spending another inference. Official Cloudflare API, Workers Builds, Bindings, Observability, and Docs MCP connectors use each operator's own OAuth grant. See AGENT-HARNESS.md, CLOUDFLARE-MCP.md, MAIL-LANDING-GUIDE.md, and RELEASE-GATE.md.
Request: “Deploy my Worker, make sure the nav does not 404 on phone, and verify the confirmation email really comes back.”
cfops-safe-deploy, cfops-live-verify, cfops-email-loopback, and cfops-context-handoff to the bounded work instead of creating permanent extra agents.For current research, cfops-google-research opens and traces primary sources instead of trusting snippets. Hard claims may also use cfops-claude-verifier as an independent second opinion when the operator has configured that provider; the user's key is never included in the repository.
Requires Node.js >= 18 (for the built-in global fetch). No other
dependencies.
Do not use the Global API Key - it has access to everything, cannot be scoped or time-limited, and there is only one per account.
Put it in your environment (never in a CLI argument or in code):
or copy .env.example to .env and fill it in:
cloudflare-ops-mcp reads CLOUDFLARE_API_TOKEN from the environment only.
For the public hosted service:
cfops_ connector key from the success page.Authorization header.The connector key is not a Cloudflare API token. Its SHA-256 hash maps to one server-side OAuth connection, so it cannot select another user's grant. Cloudflare access and refresh tokens never enter Git, chat, an issue, or the MCP tool arguments.
Claude Desktop or Cursor-style configuration:
Codex CLI:
Then set CFOPS_CONNECTOR_KEY in your own environment. Do not commit it. See OAUTH.md for status, revocation, refresh behavior, and self-hosting.
Cloudflare Ops MCP does not ship with an API key, shared account, hosted proxy token, or any hidden credentials. Every operator must bring one of these:
Do not ask users to send tokens through chat, issues, logs, or screenshots. If a token is exposed, rotate it in Cloudflare and create a new scoped token.
Wrangler consumes tokens. The official Cloudflare MCP consumes tokens. Nothing in the toolchain manufactures least-privilege tokens on demand — so everyone ends up doing agent work with one big long-lived key. This is the gap mint_scoped_token closes:
User > API Tokens > Edit). It stays a Worker secret or env var — it never travels through a chat or an agent transcript.mint_scoped_token { domain: "example.com", preset: "dns-zone", ttl_seconds: 3600 }. Dry-run first, like every mutating tool here — you see the exact policy JSON before anything is created.confirm_long=true). Presets: zone-read, dns-zone, cache-purge. There is deliberately no super or account-wide preset — mint down, never up.CLOUDFLARE_API_TOKEN=<minted> wrangler ...). When it leaks or lingers, it's a key to one zone's DNS that dies within the hour.list_tokens shows what's outstanding (never values), revoke_token kills one early.This is the flow the vending machine is built for: a strong orchestrator model plans, a cheap model executes.
mint_scoped_token for exactly that scope.apply: true, so the cheap agent's mistakes surface as diffs, not damage.MCP is model-agnostic by design: any MCP client can point at the hosted Worker endpoint, and any tool-calling LLM can drive that client.
Read-only diagnostics for the failure modes that actually burn multi-account operators:
who_serves_domain — domain → zone → Worker routes, Worker custom domains, and Pages projects that claim it, with a warning when several products fight over one hostname. Answers "what is ACTUALLY serving this URL?" without four dashboard tabs.account_doctor — which accounts this token can see, whether the account you meant is among them (wrong-token detection), and same-name Pages projects across accounts — the decoy that lets a deploy "succeed" into the wrong account while production never changes.pages_branch_check — the project's production branch vs the branch you're about to deploy. Catches the silent "git says master, project says main, every deploy lands on a preview" failure before it eats an afternoon.| Command | What it does |
|---|---|
scan <domain> | Full read-only snapshot: DNS, SPF, DKIM, DMARC, BIMI, Email Routing. |
plan <domain> [--inbox x@y] | Report desired vs current email-auth posture (no writes). |
dns <domain> --type T --name N --content C [--ttl n] [--proxied] [--apply] | Upsert a DNS record (create / update / no-op). |
email <domain> --forward a@b=to@c [--catch-all to@c] [--apply] | Plan/apply Email Routing forward rules + catch-all. |
dmarc <domain> --policy quarantine [--rua mailto:x] [--pct 25] [--apply] | Change only the DMARC p= (and rua/pct), safely. |
bimi <domain> --logo <url> [--vmc <url>] [--apply] [--force] | Set default._bimi TXT (refuses if DMARC=none unless --force). |
verify <domain> | Verify the API token, then resolve the zone. |
Global flags: --apply (perform the write; default is dry-run), --force
(BIMI DMARC override / delete), --audit <path> (audit log location),
-h/--help.
Everything is a dry-run until you add --apply. BIMI needs a hosted
SVG Tiny-PS logo URL that you supply via --logo (and, for Gmail/Apple Mail
display, a VMC/CMC via --vmc).
Assume a scoped token is exported and each domain is a zone in your account.
default._bimi TXT to example.comFirst, dry-run (writes nothing - shows the diff):
Then apply:
If
example.com's DMARC were still atp=none, the apply would be blocked with an error telling you to raise DMARC first (or pass--force). Fix DMARC, then set BIMI.
default._bimi TXT to example.orgDry-run:
Apply once the diff looks right:
(For broad display in Gmail/Apple Mail, host a VMC/CMC and add
--vmc https://example.org/bimi/vmc.pem.)
_dmarc.example.org from p=none to p=quarantineDry-run first - note it changes only p, preserving your existing rua:
Then apply:
Ramp safely. Only flip to
quarantineafterp=none+ruareports show all your legitimate mail is authenticating with alignment. Then widen--pct 25 -> 50 -> 100over a couple of weeks before ever consideringp=reject.pctis honored today but is being removed in the in-progress DMARCbis revision - treat it as current best practice, not forever.
cloudflare-ops-mcp exposes clean named exports so a host app can import and wrap it
(add your own auth, approval UI, or multi-tenant token vault) - but it has
no dependency on any host and runs perfectly standalone.
Every mutating export is dry-run unless you pass { apply: true }, and pure
logic never calls Date.now() - you (or the CLI) supply audit timestamps.
CloudflareClient, CloudflareError, redactTokenresolveZoneId, resolveZone, scanZonelistRecords, findRecord, applyDnsRecord, deleteDnsRecordgetRoutingStatus, enableRouting, listDestinations, addDestination,
listRules, getCatchAll, setupEmailRoutingparseDmarc, buildDmarc, parseSpf, getDmarc, setDmarcPolicy,
quoteTxt, unquoteTxtparseBimi, buildBimi, validateBimiSvgUrl, setupBimiplanEmailAuthappendAudit, AUDIT_DEFAULT_PATHcloudflare-ops-mcp is a generic, open tool. A larger platform can import it to
automate zone hygiene for its users (wrapping it with per-account tokens and an
approval step), but it is completely standalone - the library and CLI run on
their own with nothing but a scoped Cloudflare token.
worker/ is an optional Model Context Protocol
server (a Cloudflare Worker) that exposes the same engine as tools over a URL, so
any MCP client - an agent, Claude, Cursor - can scan_zone, plan_email_auth,
set_dmarc_policy, setup_bimi, etc. by pointing at it.
Four deliberate hardening choices:
cfops_ key. Only the key hash is stored.401. Only the private owner admin key can use the optional fallback token.apply: true after seeing the diff. BIMI keeps its DMARC precondition.Users visit /oauth/cloudflare/start, complete Cloudflare consent, and copy the one-time connector configuration. The MCP endpoint is /mcp. Private self-hosters may additionally set MCP_ACCESS_KEY and CLOUDFLARE_API_TOKEN as an owner-only fallback; never distribute that admin key.
The core library has zero dependencies; the Worker is an optional surface - you never need it to use the CLI.
Made by -/-\ M H // WT — AMH, Artificial Mind Hive, operated by Service Pricer LLC.
MIT (c) 2026 Service Pricer LLC — AMH, Artificial Mind Hive. Authored and maintained by Austin ("Pain2HuStle").
WT is AMH's current operator-safety effort: a guarded agent middle layer connecting Cloudflare Agents, MCP, and Wrangler. The goal is to let capable orchestrators and correctly labeled free or paid tool-calling agents inspect, plan, request approval, deploy, verify, and recover—without handing them raw Cloudflare tokens or letting stale agents overwrite newer work.
Watch for the stateful AMH Agent Coordinator, Cache Guardian, Change Guardian, Playwright phone/UI checks, and allowlisted Wrangler doctor, deployment, log, rollback, binding, and storage-health tools. The execution rule stays the same: check → diff → approve → apply → verify.
-/\-\ M H // WT · YOUR CLOUDFLARE STAYS YOURS