@archawat/mcp-cloudflare
MCP server for managing Cloudflare DNS across multiple zones from a single API token, enabling bulk operations like toggling proxy, listing records, and batch updates.
README
@archawat/mcp-cloudflare
Model Context Protocol (MCP) server for managing Cloudflare DNS across multiple zones (domains) from a single API token. Built for bulk workflows — flipping proxy on/off across many records, auditing DNS across zones, and batched record updates.
Features
- Multi-zone from one token — pass a domain name like
"example.com"and the server resolves the zone for you. Zone IDs also accepted. - Bulk operations —
bulk_toggle_proxy,bulk_update_dns_record, andbulk_list_dns_recordsrun concurrently and share a per-invocation zone-ID cache so repeated zones don't cost extra lookups. - Safe defaults — new A/CNAME records are created with
proxied: false(DNS-only, grey cloud). Proxy is opt-in. - Auto-pagination —
list_dns_recordsfetches every page in parallel unless you ask for a specific one.
Install
No local install required — use npx or bunx to run it on demand.
Claude Code / Claude Desktop (.mcp.json)
Via npx (Node):
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "@archawat/mcp-cloudflare"],
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}
Via bunx (Bun):
{
"mcpServers": {
"cloudflare": {
"command": "bunx",
"args": ["-y", "@archawat/mcp-cloudflare"],
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}
Claude Code CLI
claude mcp add cloudflare -s user \
-e CLOUDFLARE_API_TOKEN="cf-token-here" \
-- npx -y @archawat/mcp-cloudflare
Global install (fastest cold-start)
npm install -g @archawat/mcp-cloudflare
# or: bun add -g @archawat/mcp-cloudflare
The global bin is named mcp-cloudflare (unscoped), so:
{
"mcpServers": {
"cloudflare": {
"command": "mcp-cloudflare",
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}
API Token
Create a Cloudflare token at https://dash.cloudflare.com/profile/api-tokens with:
Zone:ReadZone:DNS:Edit
Scope the token to the zones you want to manage, or grant "All zones".
Tools
| Tool | Purpose |
|---|---|
list_zones |
Discover which domains the token can manage. |
list_dns_records |
List records in a zone; auto-paginates across all pages unless page is set. |
bulk_list_dns_records |
List records across many zones in one call. Concurrent per-zone. |
create_a_record |
Create an A record. proxied defaults to false. |
create_cname_record |
Create a CNAME record. proxied defaults to false. |
toggle_proxy |
Flip proxy on/off by record ID, or by name (+ optional type). |
bulk_toggle_proxy |
Flip proxy for many records in one call (shared proxied value). |
update_dns_record |
Patch content, ttl, proxied, or comment on a record. |
bulk_update_dns_record |
Patch many records in one call with per-item fields. |
delete_dns_record |
Delete a record by ID. Destructive. |
All tools accept either a domain name ("example.com") or a 32-char zone ID as the zone argument.
Bulk result shape
Bulk tools return per-item results; a single failure doesn't abort the batch:
{
"succeeded": 10,
"failed": 1,
"results": [
{ "zone": "example.com", "ok": true, "record": { "id": "…", "proxied": true } },
{ "zone": "other.com", "ok": false, "error": "No proxyable record found for 'www.other.com'." }
]
}
isError: true is set on the tool response whenever any item fails, while still returning every result.
Development
Requires Bun (recommended) or Node 18+.
bun install
bun run dev # run src/index.ts with --watch
bun run start # run src/index.ts once
bun run typecheck # tsc --noEmit
bun run build # emit dist/ for publishing
To run the dev copy as the MCP server instead of the published package, point .mcp.json at your local build:
{
"mcpServers": {
"cloudflare": {
"command": "bun",
"args": ["/abs/path/to/mcp-cloudflare/src/index.ts"],
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}
The server speaks stdio — your MCP client spawns the process and communicates over stdin/stdout.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。