mcp-cloudflare-crunchtools
MCP Cloudflare CrunchTools
Cloudflare DNS、Transform Rules、Page Rules、およびキャッシュ管理のためのセキュアなMCP(Model Context Protocol)サーバー。
概要
このMCPサーバーは以下のように設計されています。
デフォルトでセキュア - 包括的な脅威モデリング、入力検証、トークン保護
サードパーティサービスなし - stdio経由でローカル実行、APIトークンがマシンから出ることはありません
クロスプラットフォーム - Linux、macOS、Windowsで動作
自動更新 - GitHub ActionsがCVEを監視し、依存関係を更新
コンテナ化 - Hummingbird Pythonベースイメージ上に構築され、
quay.io/crunchtools/mcp-cloudflareで利用可能
Related MCP server: Cloudflare API MCP
命名規則
コンポーネント | 名前 |
GitHubリポジトリ | |
コンテナ |
|
Pythonパッケージ(PyPI) |
|
CLIコマンド |
|
モジュールインポート |
|
Hummingbirdを選ぶ理由
コンテナイメージはProject HummingbirdのHummingbird Pythonベースイメージ上に構築されており、以下を提供します。
最小限のCVE露出 - Hummingbirdイメージは最小限のパッケージセットで構築されており、汎用イメージと比較して攻撃面を大幅に削減
定期的な更新 - セキュリティパッチが迅速に適用され、CVE数を低く維持
Python向けに最適化 - uvパッケージマネージャーを備えた事前設定済みPython環境で、高速で再現可能なビルドを実現
本番環境対応 - 適切なシグナル処理と非rootユーザーのデフォルトを備えた本番ワークロード向けに設計
つまり、MCPサーバーは一般的なPythonコンテナイメージよりも脆弱性が少ない、堅牢化された環境で実行されます。
機能
ゾーン管理(2ツール)
list_zones- APIトークンでアクセス可能なすべてのゾーンを一覧表示get_zone- IDまたはドメイン名でゾーンの詳細を取得
DNSレコード(5ツール)
list_dns_records- フィルタリング付きでDNSレコードを一覧表示get_dns_record- 単一のDNSレコードを取得create_dns_record- A、AAAA、CNAME、MX、TXT、NS、SRV、CAAレコードを作成update_dns_record- 既存のレコードを更新delete_dns_record- レコードを削除
Transform Rules(6ツール)
list_request_header_rules/set_request_header_rules- リクエストヘッダーを変更list_response_header_rules/set_response_header_rules- レスポンスヘッダーを変更list_url_rewrite_rules/set_url_rewrite_rules- URLパス/クエリの書き換え
Page Rules(4ツール)
list_page_rules- すべてのページルールを一覧表示create_page_rule- リダイレクト、キャッシュ設定、SSLモードを作成update_page_rule- 既存のルールを変更delete_page_rule- ルールを削除
キャッシュ管理(1ツール)
purge_cache- URL、タグ、ホスト、プレフィックス、またはすべてをパージ
インストール
uvxを使用(推奨)
uvx mcp-cloudflare-crunchtoolspipを使用
pip install mcp-cloudflare-crunchtoolsコンテナを使用
podman run -e CLOUDFLARE_API_TOKEN=your_token \
quay.io/crunchtools/mcp-cloudflare設定
Cloudflare APIトークンの作成
APIトークンに移動
「Create Token」をクリック
「Create Custom Token」の横にある「Get started」をクリック
トークン名を設定
入力:
mcp-cloudflare-crunchtools
権限を設定
権限セクションには、行ごとに3つのドロップダウンがあります。
最初のドロップダウン: リソースタイプ(
AccountまたはZone)2番目のドロップダウン: 特定の権限カテゴリ
3番目のドロップダウン: アクセスレベル(
ReadまたはEdit)
各権限行を追加するには「+ Add more」をクリックします。完全な管理の場合は、以下を追加します。
リソース
権限
アクセス
Zone
Zone
Read
Zone
DNS
Edit
Zone
Page Rules
Edit
Zone
Transform Rules
Edit
Zone
Cache Purge
Purge
ゾーンリソースを設定
最初のドロップダウン: 「Include」を選択
2番目のドロップダウン: 「All zones」または「Specific zone」を選択
クライアントIPアドレスフィルタリングを設定(オプション)
「Use my IP」ボタンをクリックして、トークンを現在のIPに制限
トークンを作成してコピー
「Continue to summary」→「Create Token」をクリック
重要: トークンはすぐにコピーしてください - 一度しか表示されません!
Claude Codeに追加
claude mcp add mcp-cloudflare-crunchtools \
--env CLOUDFLARE_API_TOKEN=your_token_here \
-- uvx mcp-cloudflare-crunchtoolsまたはコンテナ版の場合:
claude mcp add mcp-cloudflare-crunchtools \
--env CLOUDFLARE_API_TOKEN=your_token_here \
-- podman run -i --rm -e CLOUDFLARE_API_TOKEN quay.io/crunchtools/mcp-cloudflareユースケース別の権限セット
読み取り専用(表示のみ)
リソース | 権限 | アクセス |
Zone | Zone | Read |
Zone | DNS | Read |
DNS管理のみ
リソース | 権限 | アクセス |
Zone | Zone | Read |
Zone | DNS | Edit |
完全管理(すべての機能)
リソース | 権限 | アクセス |
Zone | Zone | Read |
Zone | DNS | Edit |
Zone | Page Rules | Edit |
Zone | Transform Rules | Edit |
Zone | Cache Purge | Purge |
使用例
ゾーンの一覧表示
User: List my Cloudflare zones
Assistant: [calls list_zones]DNSレコードの作成
User: Create an A record for www.example.com pointing to 192.168.1.1
Assistant: [calls create_dns_record with type=A, name=www, content=192.168.1.1]セキュリティヘッダーの追加
User: Add X-Content-Type-Options: nosniff to all responses for zone abc123...
Assistant: [calls set_response_header_rules with appropriate rule]キャッシュのパージ
User: Purge the cache for https://example.com/styles.css
Assistant: [calls purge_cache with files=["https://example.com/styles.css"]]セキュリティ
このサーバーはセキュリティを主要な関心事として設計されています。SECURITY.mdを参照してください:
脅威モデルと攻撃ベクトル
多層防御アーキテクチャ
トークン処理のベストプラクティス
入力検証ルール
監査ログ
主要なセキュリティ機能
トークン保護
SecretStrとして保存(誤ってログに記録されることはありません)
環境変数のみ(ファイルや引数には決して保存されません)
すべてのエラーメッセージからサニタイズ
入力検証
すべての入力にPydanticモデルを使用
レコードタイプ、アクションの許可リスト
IDの厳密な形式検証
APIの堅牢化
ハードコードされたAPIベースURL(SSRFを防止)
TLS証明書の検証
リクエストタイムアウト
レスポンスサイズの制限
自動CVEスキャン
GitHub Actionsが依存関係を毎週スキャン
セキュリティ更新の自動PR
Dependabotアラート有効
開発
セットアップ
git clone https://github.com/crunchtools/mcp-cloudflare.git
cd mcp-cloudflare
uv syncテストの実行
uv run pytestリントと型チェック
uv run ruff check src tests
uv run mypy srcコンテナのビルド
podman build -t mcp-cloudflare .ライセンス
AGPL-3.0-or-later
貢献
貢献を歓迎します!セキュリティ関連の変更を提出する前に、SECURITY.mdをお読みください。
リンク
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-quality-maintenanceA lightweight MCP server for managing DNS records, purging cache, and interacting with the Cloudflare API through natural language commands.24
- Alicense-qualityDmaintenanceA lightweight MCP server that enables agents to interface with Cloudflare's REST API, allowing management of DNS records and other Cloudflare services.515GPL 2.0
- Alicense-quality-maintenanceA token-efficient MCP server for managing Cloudflare DNS zones and records with full CRUD support and bulk operations. It can be deployed locally via stdio or as a Cloudflare Worker for remote HTTP access.
- Alicense-qualityCmaintenanceMCP server for managing Cloudflare DNS across multiple zones from a single API token, enabling bulk operations like toggling proxy, listing records, and batch updates.18MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Cloud-hosted MCP server for durable AI memory
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crunchtools/mcp-cloudflare'
If you have feedback or need assistance with the MCP directory API, please join our Discord server