Enables AI agents to manage Cloudflare resources including zones, DNS records, Workers, Pages, analytics, and security rules.
Also known as craft-agent/cloudflare-tools, @craftsamo/cloudflare-tools
- Stars
- 0
- Tools
- 43
- Downloads, 30 days
- 4,261
- Latest version
- 0.12.1
- Last commit
- Nov 13, 2026
- License
- —
What is cloudflare-tools MCP?
cloudflare-tools enables AI agents to manage Cloudflare resources including zones, DNS records, Workers, Pages, analytics, and security rules. It exposes 43 tools, such as cloudflare_account_read, cloudflare_zone_read, cloudflare_zone_setting_edit.
Summary generated from the project's README
About cloudflare-tools MCP server
Managing Cloudflare infrastructure through AI agents is possible with this MCP server, which provides direct access to zones, DNS records, Workers, Pages, and security rules. Developers can use it within various environments including Claude Code, Codex, Grok Build, and Antigravity, or connect it to any other MCP host using npx. The server requires Node.js version 24 or later to function.
Users can control specific toolsets like dns, zones, or analytics by configuring settings in their host application. For example, the dns toolset allows for batch adding or editing up to 20 records at once, while the zones toolset enables purging cache for up to 100 URLs or managing DNSSEC. The server supports both read-only modes and full administrative access, depending on how the user configures the plugin options and permissions.
What you can do with it
- 1Batch DNS managementAn AI agent can add or modify multiple DNS records simultaneously in a single operation.
- 2Automated cache purgingYou can instruct an agent to clear specific URLs or the entire cache for a zone to ensure content updates.
- 3Security rule configurationDevelopers can use the agent to add, change, or move various types of rules like Single Redirects or Cache Rules.
- 4Traffic and security monitoringAn agent can retrieve detailed analytics regarding bandwidth, threats, and client countries for a specific zone.
Written from the project's README. Every use case is checked against a quote from it.
How to install cloudflare-tools MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall cloudflare-tools MCP in Claude Code
$ claude mcp add cloudflare-tools -- npx -y @craftsamo/cloudflare-toolsInstall cloudflare-tools MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"cloudflare-tools": {
"command": "npx",
"args": [
"-y",
"@craftsamo/cloudflare-tools"
]
}
}
}Install cloudflare-tools MCP in VS Code
.vscode/mcp.json
{
"servers": {
"cloudflare-tools": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@craftsamo/cloudflare-tools"
]
}
}
}Install cloudflare-tools MCP in VS Code CLI
$ code --add-mcp '{"name":"cloudflare-tools","type":"stdio","command":"npx","args":["-y","@craftsamo/cloudflare-tools"]}'Install cloudflare-tools MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"cloudflare-tools": {
"command": "npx",
"args": [
"-y",
"@craftsamo/cloudflare-tools"
]
}
}
}Install cloudflare-tools MCP in Codex
$ codex mcp add cloudflare-tools -- npx -y @craftsamo/cloudflare-toolsInstall cloudflare-tools MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.cloudflare-tools] command = "npx" args = ["-y", "@craftsamo/cloudflare-tools"]
Install cloudflare-tools MCP in Gemini CLI
$ gemini mcp add -s user cloudflare-tools npx -- -y @craftsamo/cloudflare-toolsInstall cloudflare-tools MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"cloudflare-tools": {
"command": "npx",
"args": [
"-y",
"@craftsamo/cloudflare-tools"
]
}
}
}cloudflare-tools MCP tools 43
Detected from the READMEcloudflare_account_readcloudflare_zone_readcloudflare_zone_setting_editcloudflare_zone_setting_weakencloudflare_zone_cache_purgecloudflare_zone_cache_purge_allcloudflare_zone_dnssec_enablecloudflare_zone_dnssec_disablecloudflare_dns_readcloudflare_dns_record_addcloudflare_dns_record_editcloudflare_dns_record_delete
| cloudflare_account_read | — | |
| cloudflare_zone_read | — | |
| cloudflare_zone_setting_edit | — | |
| cloudflare_zone_setting_weaken | — | |
| cloudflare_zone_cache_purge | — | |
| cloudflare_zone_cache_purge_all | — | |
| cloudflare_zone_dnssec_enable | — | |
| cloudflare_zone_dnssec_disable | — | |
| cloudflare_dns_read | — | |
| cloudflare_dns_record_add | — | |
| cloudflare_dns_record_edit | — | |
| cloudflare_dns_record_delete | — |
Show all 43 toolsShow fewer tools
cloudflare_rules_readcloudflare_rules_addcloudflare_rules_editcloudflare_rules_deletecloudflare_analytics_readcloudflare_workers_readcloudflare_workers_rollbackcloudflare_pages_readcloudflare_pages_rollbackcloudflare_pages_domain_addcloudflare_pages_domain_removecloudflare_storage_readcloudflare_storage_createcloudflare_storage_deletecloudflare_tunnel_readcloudflare_tunnel_route_addcloudflare_tunnel_route_editcloudflare_tunnel_route_removecloudflare_email_readcloudflare_email_rule_addcloudflare_email_rule_editcloudflare_email_rule_deletecloudflare_email_catchall_editcloudflare_email_address_addcloudflare_email_address_deletecloudflare_queues_readcloudflare_hyperdrive_readcloudflare_vectorize_readcloudflare_turnstile_readcloudflare_access_readcloudflare_registrar_read
| cloudflare_rules_read | — | |
| cloudflare_rules_add | — | |
| cloudflare_rules_edit | — | |
| cloudflare_rules_delete | — | |
| cloudflare_analytics_read | — | |
| cloudflare_workers_read | — | |
| cloudflare_workers_rollback | — | |
| cloudflare_pages_read | — | |
| cloudflare_pages_rollback | — | |
| cloudflare_pages_domain_add | — | |
| cloudflare_pages_domain_remove | — | |
| cloudflare_storage_read | — | |
| cloudflare_storage_create | — | |
| cloudflare_storage_delete | — | |
| cloudflare_tunnel_read | — | |
| cloudflare_tunnel_route_add | — | |
| cloudflare_tunnel_route_edit | — | |
| cloudflare_tunnel_route_remove | — | |
| cloudflare_email_read | — | |
| cloudflare_email_rule_add | — | |
| cloudflare_email_rule_edit | — | |
| cloudflare_email_rule_delete | — | |
| cloudflare_email_catchall_edit | — | |
| cloudflare_email_address_add | — | |
| cloudflare_email_address_delete | — | |
| cloudflare_queues_read | — | |
| cloudflare_hyperdrive_read | — | |
| cloudflare_vectorize_read | — | |
| cloudflare_turnstile_read | — | |
| cloudflare_access_read | — | |
| cloudflare_registrar_read | — |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablecraft-agent/cloudflare-tools is public and reachablegithub.com/craft-agent/cloudflare-tools ↗Pass
- Package names this repository as its source@craftsamo/cloudflare-tools names craft-agent/cloudflare-tools as sourcenpmjs.com/package/@craftsamo/cloudflare-tools ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for @craftsamo/cloudflare-toolsnpmjs.com/package/@craftsamo/cloudflare-tools/v/0.12.0#prove ↗Pass
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-11-13github.com/craft-agent/cloudflare-tools ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @craftsamo/cloudflare-toolsPass
- No critical advisory in the package or its dependenciesthe package checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model43 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubcloudflare-tools
Cloudflare tools for coding agents: zones, DNS, analytics, Workers, Pages, storage and tunnels.
| Harness | Delivery | Pinned by |
|---|---|---|
| OpenCode V2 | native plugin (npm package, with skills) | the version in the package |
| OpenCode V1 | native plugin (npm package, no skills) | the version in the package |
| Claude Code | plugin: MCP server and skills | the release tag, as the ref |
| Codex | plugin: MCP server and skills | the release tag, as the ref |
| Grok Build | plugin: MCP server and skills | the release tag, as @ref |
| Antigravity | plugin: MCP server and skills | the release tag's tree URL |
| Hermes Agent | native plugin (Python, calls the command line) | the release commit, as the SHA |
| other MCP host | MCP server from npm | the version in the package |
The tools need Node.js 24 or later.
docs/conventions.md describes how the tools are named
and how they behave.
Install
Install from a release, never from the default branch: a release is a tag whose
commit carries the built dist/, and the default branch does not. In the
commands below, <version> is a release's version (1.2.3) and <sha> is the
commit its tag names:
gh api repos/craft-agent/cloudflare-tools/commits/v<version> --jq .sha
OpenCode
OpenCode V2 takes the package and its options in opencode.json:
{
"plugins": [{ "package": "@craftsamo/cloudflare-tools@<version>", "options": { "read_only": false } }],
"permissions": [{ "action": "cloudflare_*", "resource": "*", "effect": "ask" }]
}
OpenCode V1 takes the package as a string, or as a pair with its options:
{
"plugin": [["@craftsamo/cloudflare-tools@<version>", { "read_only": false }]],
"permission": { "cloudflare_*": "ask" }
}
OpenCode allows any action no rule names, so the plugin's request is granted
silently unless a rule says ask. Read tools never ask, so the cloudflare_* glob
is safe.
The options are the settings. A toolset that is off by default is
turned on by listing it in toolsets with the ones to keep, for example
"options": { "toolsets": ["account", "zones", "dns", "workers", "pages", "email"] }.
V1 registers no skills. Unpack the package and copy its skills/* folders into
~/.config/opencode/skills/:
npm pack @craftsamo/cloudflare-tools@<version>
tar -xzf craftsamo-cloudflare-tools-<version>.tgz
mkdir -p ~/.config/opencode/skills
cp -r package/skills/* ~/.config/opencode/skills/
rm -rf package craftsamo-cloudflare-tools-<version>.tgz
Claude Code
claude plugin marketplace add craft-agent/cloudflare-tools#v<version>
claude plugin install cloudflare-tools@craft-agent
Codex
codex plugin marketplace add craft-agent/cloudflare-tools --ref v<version>
codex plugin add cloudflare-tools@craft-agent
Codex turns - into _ in server names, so it shows the tools as
mcp__cloudflare_tools__cloudflare_*. It starts the MCP server in the plugin's
install directory and passes no roots, so the server takes each call's directory
from what Codex sends with the call: its sandbox state, which the server asks
for, else the one workspace it names.
The plugin declares default_tools_approval_mode = "writes": Codex asks before
every tool not marked read-only. A user's
[plugins."<plugin>".mcp_servers.<server>] setting can only tighten it. Setting
auto there yields prompt (reads asked too), since Codex treats auto and
writes as incomparable.
Grok Build
grok plugin install craft-agent/cloudflare-tools@v<version> --trust
Grok starts the MCP server in the session's working directory.
Antigravity
Install from the tree of the release tag, never from the default branch, which
has no built dist/; Antigravity clones the tag into
~/.gemini/config/plugins/cloudflare-tools.
agy plugin install https://github.com/craft-agent/cloudflare-tools/tree/v<version>
Hermes Agent
Hermes installs a commit, not a tag, and the plugin installs disabled:
hermes plugins install craft-agent/cloudflare-tools --ref <sha>
hermes plugins enable cloudflare-tools
Hermes scans a plugin when it installs it. From v0.7.0 the verdict is
caution: the tunnel tools name the token permission Account → Cloudflare One
Connector: cloudflared, and Hermes rates the word as a tunneling service.
hermes plugins install then asks before installing; where it cannot ask (no
terminal), add --force, which overrides a caution verdict and no other.
If a Hermes gateway is already running, restart it (hermes gateway restart) to
load the plugin.
The plugin runs the Node it found when Hermes started. If a version manager
removes that version while Hermes runs, a call looks for Node again; when it
finds none, restart Hermes from a shell where node runs.
Any other MCP host
Add the server to the host's MCP configuration. Flags go in args:
{
"mcpServers": {
"cloudflare-tools": {
"command": "npx",
"args": ["-y", "@craftsamo/cloudflare-tools@<version>", "--read-only"]
}
}
}
Tools and skills
Each toolset comes with a skill that tells an agent how to use its tools. A
skill names its toolset under metadata in its frontmatter
(metadata: { toolset: dns }, written as a block). OpenCode V2 and Hermes
register it only when the settings register at least one of that toolset's
tools, so a profile with the toolset off, or with all its tools removed, does
not see it; a skill without a toolset is always registered. Claude Code,
Codex, Grok Build and Antigravity install the skill folder whole and pass the
settings only to the MCP server, so they list every skill whatever the
settings select. OpenCode V1 registers no skills, and its copied skills are
all listed too.
Account (account)
Account credentials, token verification, and audit logs.
| Tool | What it does | Class |
|---|---|---|
cloudflare_account_read |
view account details and token status, list configured accounts, or query audit logs |
read |
The skill is cloudflare-account, shown as
cloudflare-tools:cloudflare-account in Claude Code and
cloudflare-tools:account in Hermes.
Zones (zones)
Zone lookup, settings (read and change), Universal SSL, certificates, and DNSSEC.
| Tool | What it does | Class |
|---|---|---|
cloudflare_zone_read |
list zones, view details, read settings, Universal ssl status, or dnssec |
read |
cloudflare_zone_setting_edit |
change 1–20 zone settings in order; refuses a change that lowers protection | overwrite |
cloudflare_zone_setting_weaken |
change zone settings in ways that lower a visitor's protection; always asks first | administrative |
cloudflare_zone_cache_purge |
purge cached copies of up to 100 URLs, hosts, prefixes or tags in a zone | idempotent |
cloudflare_zone_cache_purge_all |
purge the whole cache of a zone; always asks first | administrative |
cloudflare_zone_dnssec_enable |
turn DNSSEC on for a zone; harmless until registrar publishes the DS record | idempotent |
cloudflare_zone_dnssec_disable |
turn DNSSEC off for a zone; requires DS removed at registrar first | administrative |
The skill is cloudflare-zones, shown as
cloudflare-tools:cloudflare-zones in Claude Code and
cloudflare-tools:zones in Hermes.
DNS (dns)
DNS records: list, read one in full, export the zone file, add records, change them, and delete them.
| Tool | What it does | Class |
|---|---|---|
cloudflare_dns_read |
list records, view one in full, or export the zone file in BIND form |
read |
cloudflare_dns_record_add |
add 1–20 records of eight types in one all-or-nothing batch | add |
cloudflare_dns_record_edit |
change 1–20 records by id in one all-or-nothing batch; never a record's type | overwrite |
cloudflare_dns_record_delete |
delete 1–20 records by id, with replacements in the same batch; always asks first | administrative |
The skill is cloudflare-dns, shown as
cloudflare-tools:cloudflare-dns in Claude Code and
cloudflare-tools:dns in Hermes.
Rules (rules)
Rules: read which rule phases of a zone hold rules and the rules of one phase in order, with their ids, positions and versions; add, change, move or delete a Single Redirect, Cache Rule, Configuration Rule, URL Rewrite Rule, Request or Response Header Transform Rule, Origin Rule or Compression Rule. WAF custom rules, rate limiting rules and custom error rules can be read but not changed. Expressions, descriptions and parameters are the user's data, returned as data and never instructions. This toolset is off by default; turn it on with the toolsets setting (see Settings).
| Tool | What it does | Class |
|---|---|---|
cloudflare_rules_read |
which phases of a zone hold rules; the rules of one phase in order |
read |
cloudflare_rules_add |
add a rule to a phase, last or before, after or at a place; refuses a duplicate of a rule the phase holds | add |
cloudflare_rules_edit |
change a rule's expression, action, parameters, description, on/off or place, naming the version read; refuses a rule changed since | overwrite |
cloudflare_rules_delete |
delete a rule of a phase; always asks first | administrative |
The token needs Zone → Dynamic URL Redirects, Cache Settings, Config Settings, Zone Transform Rules, Origin or Response Compression → Read for the phase it reads, and Edit to add, change or delete a rule in it. Zone → Zone WAF and Custom Errors → Read cover the read-only phases.
The skill is cloudflare-rules, shown as
cloudflare-tools:cloudflare-rules in Claude Code and
cloudflare-tools:rules in Hermes.
Analytics (analytics)
Analytics: read a zone's traffic per day (requests, bandwidth, cache hits, threats, page views and unique visitors), the most requested paths, client countries and response statuses, what the security features did (not on the Free plan) and the latest security events, and the account's Workers invocations, errors and CPU time, over a recent time range. This toolset is off by default; turn it on with the toolsets setting (see Settings).
| Tool | What it does | Class |
|---|---|---|
cloudflare_analytics_read |
traffic per UTC day; the top paths, countries and statuses; security and security_events; workers |
read |
The token needs Zone → Analytics → Read, and Zone Read to look the zone up; workers needs Account → Account Analytics → Read instead.
The skill is cloudflare-analytics, shown as
cloudflare-tools:cloudflare-analytics in Claude Code and
cloudflare-tools:analytics in Hermes.
Workers (workers)
Workers: list them, read one's settings and bindings, deployments and versions, a zone's Worker routes, custom domains, cron triggers and secret names and types, and roll a Worker back to versions that served before. Building, uploading and deploying new code stay with Wrangler; routes, custom domains and cron triggers are read here and changed in wrangler.toml.
| Tool | What it does | Class |
|---|---|---|
cloudflare_workers_read |
list, view, deployments, versions, routes, domains, schedules, secrets (names only) |
read |
cloudflare_workers_rollback |
roll a Worker back to versions that served before; always asks first | administrative |
The token needs Workers Scripts Read; routes also needs Workers Routes Read; routes, and domains with zone, need Zone Read to look the zone up. The rollback needs Workers Scripts Write.
The skill is cloudflare-workers, shown as
cloudflare-tools:cloudflare-workers in Claude Code and
cloudflare-tools:workers in Hermes.
Pages (pages)
Pages: list projects, read their build settings, environment variable names and bindings, production and preview deployments, including which one is live, a build's logs, and custom domains; switch a project's production back or forward to a deployment that built successfully; and add or remove its custom domains. Building and deploying new code stay with Git and Wrangler; the DNS records of a custom domain stay with the DNS tools.
| Tool | What it does | Class |
|---|---|---|
cloudflare_pages_read |
list projects, view one, its deployments, a build's logs, custom domains |
read |
cloudflare_pages_rollback |
switch production to a deployment that built successfully; always asks first | administrative |
cloudflare_pages_domain_add |
add a custom domain to a project, creating no DNS record; always asks first | administrative |
cloudflare_pages_domain_remove |
remove a custom domain from a project, deleting no DNS record; always asks first | administrative |
The token needs the Pages Read permission. The writes need Pages Write, and the DNS lookups of the domain tools need Zone Read and DNS Read.
The skill is cloudflare-pages, shown as
cloudflare-tools:cloudflare-pages in Claude Code and
cloudflare-tools:pages in Hermes.
Storage (storage)
Storage: list an account's R2 buckets and a bucket's objects and folders by name, size and date, and read whether a bucket is public (its r2.dev domain and custom domains), its CORS rules and the lifecycle rules that delete its objects; list Workers KV namespaces and their key names; list D1 databases and read one's size and schema; create an empty bucket, namespace or database, and delete one that is proven empty. An object's body, a KV value and a table's rows are never read, the D1 schema comes from one fixed statement, and only the default jurisdiction is listed. Cloudflare deletes a KV namespace or D1 database with its contents, so the delete tool proves the store empty first; emptying a store stays with the user. This toolset is off by default; turn it on with the toolsets setting (see Settings).
| Tool | What it does | Class |
|---|---|---|
cloudflare_storage_read |
R2 buckets, a bucket's details, its objects; KV namespaces, their keys; D1 databases, a database's schema |
read |
cloudflare_storage_create |
create an empty R2 bucket, KV namespace or D1 database from a name | add |
cloudflare_storage_delete |
delete a bucket, namespace or database only when it is proven empty; always asks first | administrative |
The token needs Account → Workers R2 Storage → Read, Workers KV Storage → Read or D1 → Read, for the store it reads; creating and deleting need the same permission's Edit.
The skill is cloudflare-storage, shown as
cloudflare-tools:cloudflare-storage in Claude Code and
cloudflare-tools:storage in Hermes.
Tunnels (tunnels)
Tunnels: list an account's Cloudflare Tunnels by name, status and connection times, and read one tunnel's active connectors, edge connections, colos and public-hostname ingress routing rules. A tunnel's run token is never exposed, connectors' internal ids and origin IP addresses are never read, and deleted tunnels are left out. For locally managed tunnels, ingress rules are kept on the host and cannot be read here. A hostname can be published through a dashboard-managed tunnel to a local service: the tool adds the rule and the proxied CNAME it needs, refuses a hostname that has other DNS records, and always asks first. Another tool changes the service a published hostname goes to, and one withdraws a hostname, deleting its CNAME to the tunnel when no other rule uses it and never touching other records; both always ask first. This toolset is off by default; turn it on with the toolsets setting (see Settings).
| Tool | What it does | Class |
|---|---|---|
cloudflare_tunnel_read |
tunnels of the account; one tunnel's status and ingress |
read |
cloudflare_tunnel_route_add |
publish a hostname (and optional path) through a tunnel to a local service; always asks first | administrative |
cloudflare_tunnel_route_edit |
change the service a published hostname goes to, naming the current one; always asks first | administrative |
cloudflare_tunnel_route_remove |
withdraw a hostname from a tunnel and delete its CNAME to the tunnel; always asks first | administrative |
The token needs Account → Cloudflare One Connector: cloudflared → Read. Publishing or withdrawing a hostname needs
Account → Cloudflare One Connector: cloudflared → Edit and Zone → DNS → Edit; changing where one goes needs
Account → Cloudflare One Connector: cloudflared → Edit, and Zone → DNS → Read for the record it reports. Each public hostname also says
whether a Zero Trust Access application matches it, which needs Account → Access:
Apps and Policies → Read; without it the coverage is unknown. A match is not a
promise that every visitor signs in: a Bypass policy can still let them through.
The skill is cloudflare-tunnels, shown as
cloudflare-tools:cloudflare-tunnels in Claude Code and
cloudflare-tools:tunnels in Hermes.
cloudflare-tools MCP questions
How do I add cloudflare-tools MCP to Claude Code?
Run claude mcp add cloudflare-tools -- npx -y @craftsamo/cloudflare-tools in your terminal. Add --scope user to make it available in every project.
How do I add cloudflare-tools MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does cloudflare-tools MCP provide?
It exposes 43 tools, including cloudflare_account_read, cloudflare_zone_read, cloudflare_zone_setting_edit, cloudflare_zone_setting_weaken, cloudflare_zone_cache_purge.
How can I install this server using npx?
You can add the server to your MCP configuration using npx with the package name and version, for example: npx -y @craftsamo/cloudflare-tools@<version>.
Can I run the tools in read-only mode?
Yes, you can pass the --read-only flag when configuring the server in your MCP host.
Does the server support managing DNS records?
Yes, it provides tools to list, read, add, edit, and delete DNS records in batches.