
MCP Cloudflare
io.github.crunchtools由 GitHub 账号 crunchtools 发布v0.1.1更新于 Oct 24, 2026
Secure MCP server for Cloudflare DNS, Transform Rules, and Page Rules
发布方自己的服务:Cloudflare
概览
一个本地 MCP 服务器,让助手通过 Cloudflare API 管理区域、DNS 记录、转换规则、页面规则、Access 应用和缓存。
- 可以做什么
- 列出区域,并按 ID 或域名获取区域详情;列出、获取、创建、更新和删除常见类型的 DNS 记录,支持筛选。列出并设置请求头、响应头和 URL 重写转换规则。列出、创建、更新和删除用于重定向、缓存设置和 SSL 模式的页面规则。查看 Zero Trust Access 组织、应用和策略,并创建或删除 Access 应用与策略。按 URL、标签、主机、前缀或全部清除缓存。
- 适用场景
- 适合让助手查看或修改自己域名的 Cloudflare 配置,例如添加 DNS 记录、设置安全响应头、调整页面规则或清除缓存,而无需打开控制台。
- 运行要求
- 以 stdio 方式在本地运行,可通过 uvx 或 pip 安装 Python 包,也可使用容器镜像。需要通过环境变量 CLOUDFLARE_API_TOKEN 提供 Cloudflare API 令牌,并按所需操作配置权限(文档给出只读、仅 DNS 和完整管理三种权限组合)。需要访问 Cloudflare API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 MCP Cloudflare,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP Cloudflare CrunchTools
A secure MCP (Model Context Protocol) server for Cloudflare DNS, Transform Rules, Page Rules, and cache management.
Overview
This MCP server is designed to be:
- Secure by default - Threat modeling, input validation, and token protection
- No third-party services - Runs locally via stdio, your API token never leaves your machine
- Cross-platform - Works on Linux, macOS, and Windows
- Automatically updated - GitHub Actions monitor for CVEs and update dependencies
- Containerized - Available at
quay.io/crunchtools/mcp-cloudflarebuilt on Hummingbird Python base image
Naming Convention
Why Hummingbird?
The container image is built on the Hummingbird Python base image from Project Hummingbird, which provides:
- Minimal CVE exposure - Hummingbird images are built with a minimal package set, dramatically reducing the attack surface compared to general-purpose images
- Regular updates - Security patches are applied promptly, keeping CVE counts low
- Optimized for Python - Pre-configured Python environment with uv package manager for fast, reproducible builds
- Production-ready - Designed for production workloads with proper signal handling and non-root user defaults
This means your MCP server runs in a hardened environment with fewer vulnerabilities than typical Python container images
Features
Zone Management (2 tools)
list_zones- List all zones accessible by your API tokenget_zone- Get zone details by ID or domain name
DNS Records (5 tools)
list_dns_records- List DNS records with filteringget_dns_record- Get a single DNS recordcreate_dns_record- Create A, AAAA, CNAME, MX, TXT, NS, SRV, CAA recordsupdate_dns_record- Update existing recordsdelete_dns_record- Delete records
Transform Rules (6 tools)
list_request_header_rules/set_request_header_rules- Modify request headerslist_response_header_rules/set_response_header_rules- Modify response headerslist_url_rewrite_rules/set_url_rewrite_rules- URL path/query rewrites
Page Rules (4 tools)
list_page_rules- List all page rulescreate_page_rule- Create redirects, cache settings, SSL modesupdate_page_rule- Modify existing rulesdelete_page_rule- Remove rules
Access (8 tools)
get_access_organization- The Zero Trust organization and its team login domainlist_access_apps/get_access_app- Applications on a zone, with their audience tagscreate_access_app/delete_access_app- Put a hostname behind an Access login, or take it outlist_access_policies- Who an application admitscreate_access_policy/delete_access_policy- Allow, deny or bypass by email, email domain, IP or everyone
Cache Management (1 tool)
purge_cache- Purge by URL, tag, host, prefix, or everything
Installation
With uvx (Recommended)
With pip
With Container
Configuration
Creating a Cloudflare API Token
-
Navigate to API Tokens
- Go to https://dash.cloudflare.com/profile/api-tokens
- Click "Create Token"
- Click "Get started" next to "Create Custom Token"
-
Configure Token Name
- Enter:
mcp-cloudflare-crunchtools
- Enter:
-
Configure Permissions
The Permissions section has three dropdowns per row:
- First dropdown: Resource type (
AccountorZone) - Second dropdown: Specific permission category
- Third dropdown: Access level (
ReadorEdit)
Click "+ Add more" to add each permission row. For full management, add:
- First dropdown: Resource type (
-
Configure Zone Resources
- First dropdown: Select "Include"
- Second dropdown: Select "All zones" or "Specific zone"
-
Configure Client IP Address Filtering (Optional)
- Click "Use my IP" button to restrict token to your current IP
-
Create and Copy Token
- Click "Continue to summary" → "Create Token"
- IMPORTANT: Copy the token immediately - it's only shown once!
Add to Claude Code
Or for the container version:
Permission Sets by Use Case
Read-Only (viewing only)
DNS Management Only
Full Management (all features)
Usage Examples
List Your Zones
Create a DNS Record
Add Security Headers
Purge Cache
Security
This server was designed with security as a primary concern. See SECURITY.md for:
- Threat model and attack vectors
- Defense in depth architecture
- Token handling best practices
- Input validation rules
- Audit logging
Key Security Features
-
Token Protection
- Stored as SecretStr (never accidentally logged)
- Environment variable only (never in files or args)
- Sanitized from all error messages
-
Input Validation
- Pydantic models for all inputs
- Allowlist for record types, actions
- Strict format validation for IDs
-
API Hardening
- Hardcoded API base URL (prevents SSRF)
- TLS certificate validation
- Request timeouts
- Response size limits
-
Automated CVE Scanning
- GitHub Actions scan dependencies weekly
- Automatic PRs for security updates
- Dependabot alerts enabled
Development
Setup
Run Tests
Lint and Type Check
Build Container
License
AGPL-3.0-or-later
Contributing
Contributions welcome! Please read SECURITY.md before submitting security-related changes.
Links
来源:README.md,提交 8ff53ac
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Cloudflare 集成

Cloudflare
com.cloudflare.mcp官方发布者
Cloudflare 文档 MCP 服务器:让助手搜索 Cloudflare 文档,并阅读 Pages 迁移到 Workers 的指南。

Bubble to Cloudflare App & Data Migrator
由 GitHub 账号 Red-Center-Studio 发布
把 Bubble 应用的数据、文件和界面迁移到用户自己的 Cloudflare 账户(D1、R2、Workers),并提供审计、方案、预览与校验步骤。

Cloudflare R2
由 GitHub 账号 magurelabs 发布
把文件上传到你自己的 Cloudflare R2 存储桶并返回可分享的链接,让助手能把文件发布到你的对象存储。

Cloudflare Tools
由 GitHub 账号 craft-agent 发布
面向编码代理的 Cloudflare 工具:读取与修改区域、DNS 记录、Workers、Pages、存储、隧道等资源。

Cloudflare Mcp
由 GitHub 账号 mrfentmen 发布
Query Cloudflare v4 (API token; set CLOUDFLARE_API_TOKEN, Bearer): zones, accounts, DNS records.