Skip to main content
Glama
archawat

@archawat/mcp-cloudflare

by archawat

@archawat/mcp-cloudflare

単一のAPIトークンから複数のゾーン(ドメイン)にわたるCloudflare DNSを管理するためのModel Context Protocol (MCP) サーバーです。バルクワークフロー向けに構築されており、多数のレコードに対するプロキシのオン/オフ切り替え、ゾーン全体のDNS監査、レコードの一括更新などが行えます。

機能

  • 1つのトークンでマルチゾーン対応"example.com" のようなドメイン名を渡すだけで、サーバーがゾーンを解決します。ゾーンIDも使用可能です。

  • バルク操作bulk_toggle_proxybulk_update_dns_recordbulk_list_dns_records は並行して実行され、呼び出しごとのゾーンIDキャッシュを共有するため、繰り返しゾーンを検索するコストがかかりません。

  • 安全なデフォルト設定 — 新しいA/CNAMEレコードは proxied: false(DNSのみ、グレーの雲)で作成されます。プロキシはオプトイン方式です。

  • 自動ページネーションlist_dns_records は、特定のページを指定しない限り、すべてのページを並行して取得します。

Related MCP server: Cloudflare API MCP

インストール

ローカルへのインストールは不要です。npx または bunx を使用してオンデマンドで実行してください。

Claude Code / Claude Desktop (.mcp.json)

npx (Node) を使用する場合:

{
  "mcpServers": {
    "cloudflare": {
      "command": "npx",
      "args": ["-y", "@archawat/mcp-cloudflare"],
      "env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
    }
  }
}

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

グローバルインストール(コールドスタートが最速)

npm install -g @archawat/mcp-cloudflare
# or: bun add -g @archawat/mcp-cloudflare

グローバルバイナリ名は mcp-cloudflare(スコープなし)です:

{
  "mcpServers": {
    "cloudflare": {
      "command": "mcp-cloudflare",
      "env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
    }
  }
}

APIトークン

https://dash.cloudflare.com/profile/api-tokens にて、以下の権限を持つCloudflareトークンを作成してください:

  • Zone:Read

  • Zone:DNS:Edit

トークンのスコープを管理したいゾーンに限定するか、「すべてのゾーン」へのアクセス権を付与してください。

ツール

ツール

目的

list_zones

トークンで管理可能なドメインを検出します。

list_dns_records

ゾーン内のレコードをリスト表示します。page が設定されていない限り、すべてのページを自動的にページネーションします。

bulk_list_dns_records

1回の呼び出しで複数のゾーンにわたるレコードをリスト表示します。ゾーンごとに並行処理されます。

create_a_record

Aレコードを作成します。proxied のデフォルトは false です。

create_cname_record

CNAMEレコードを作成します。proxied のデフォルトは false です。

toggle_proxy

レコードID、または名前(+オプションでタイプ)を指定してプロキシをオン/オフに切り替えます。

bulk_toggle_proxy

1回の呼び出しで多数のレコードのプロキシを切り替えます(共有の proxied 値を使用)。

update_dns_record

レコードの contentttlproxied、または comment をパッチ更新します。

bulk_update_dns_record

アイテムごとのフィールドを指定して、1回の呼び出しで多数のレコードをパッチ更新します。

delete_dns_record

IDを指定してレコードを削除します。破壊的な操作です。

すべてのツールは、zone 引数としてドメイン名("example.com")または32文字のゾーンIDのいずれかを受け入れます。

バルク結果の形式

バルクツールはアイテムごとの結果を返します。単一の失敗がバッチ全体を中断させることはありません:

{
  "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 が設定されますが、すべての結果は引き続き返されます。

開発

Bun(推奨)または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

公開されたパッケージの代わりに開発用コピーをMCPサーバーとして実行するには、.mcp.json でローカルビルドを指定してください:

{
  "mcpServers": {
    "cloudflare": {
      "command": "bun",
      "args": ["/abs/path/to/mcp-cloudflare/src/index.ts"],
      "env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
    }
  }
}

サーバーはstdioを使用します。MCPクライアントがプロセスを起動し、stdin/stdout経由で通信します。

ライセンス

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP server for Blockscout

  • MCP server for interacting with the Supabase platform

View all MCP Connectors

Latest Blog Posts

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/archawat/mcp-cloudflare'

If you have feedback or need assistance with the MCP directory API, please join our Discord server