Cloudflare

io.github.ofershap由 GitHub 帳號 ofershap 發布v1.0.2更新於 Oct 24, 2026

MCP server to manage Cloudflare Workers, KV, R2, Pages, DNS, and cache from your IDE

發布方自己的服務:Cloudflare

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理在 IDE 中管理 Cloudflare 的網域區域、DNS 記錄、Workers、KV、R2 儲存桶與快取清除。

可以做什麼
列出 Cloudflare 網域區域及其 DNS 記錄,並為區域建立或刪除 DNS 記錄。列出 Workers 指令碼並刪除 Workers 指令碼。列出 KV 命名空間、列出鍵、讀取、寫入與刪除 KV 值。列出 R2 儲存桶。清除區域快取,可全部清除或只清除指定 URL。
適用情境
適合在與助理對話時查看或修改 Cloudflare 的 DNS、Workers、KV 或快取設定,而不必開 Cloudflare 主控台,例如排查問題時查詢記錄或清除某個 URL 的快取。
執行需求
透過 npx 從 npm 套件 mcp-server-cloudflare-dns 在本機執行,需要 Node.js。需要在 CLOUDFLARE_API_TOKEN 中提供 Cloudflare API 權杖,Workers、KV 與 R2 操作還需要 CLOUDFLARE_ACCOUNT_ID。權杖需具備對應權限,例如 Zone:Read、Zone:Edit、Workers Scripts:Edit、Workers KV Storage:Edit 與 Zone:Cache Purge。
安裝前請注意
此權杖可實際控制你的 Cloudflare 帳戶,應只授予所需權限。多個工具會變更或刪除線上資料:建立與刪除 DNS 記錄、刪除 Workers 指令碼、寫入與刪除 KV 鍵,以及清除快取。誤操作可能導致網站或 Worker 無法運作。憑證以環境變數形式寫入用戶端設定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Cloudflare,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP Server Cloudflare — Workers, KV, R2, DNS & Cache for AI Assistants

[npm version] [npm downloads] [CI] [License: MIT] [Agent Plugins]

An MCP server that lets your AI assistant manage Cloudflare Workers, KV, R2, DNS, and cache purging. Vercel, Railway, and Netlify all have MCP servers — now Cloudflare does too.

You: "List my Workers and purge cache for example.com"AI:  Found 3 Workers: api-gateway, auth-worker, image-resizer     ✅ Cache purged for https://example.com

Works with Claude Desktop, Cursor, and VS Code Copilot.

[MCP server Cloudflare demo — listing Workers and purging cache from Claude Desktop]

Tools

ToolWhat it does
cf_zonesList your Cloudflare zones (domains)
cf_dns_listList DNS records for a zone
cf_dns_createCreate a DNS record
cf_dns_deleteDelete a DNS record
cf_workers_listList Workers scripts
cf_worker_deleteDelete a Workers script
cf_kv_namespacesList KV namespaces
cf_kv_keysList keys in a KV namespace
cf_kv_getGet a value from KV
cf_kv_putWrite a value to KV
cf_kv_deleteDelete a KV key
cf_r2_bucketsList R2 storage buckets
cf_cache_purgePurge cache (all or specific URLs)

Quick Start

With Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "cloudflare": {      "command": "npx",      "args": ["-y", "mcp-server-cloudflare-dns"],      "env": {        "CLOUDFLARE_API_TOKEN": "your_api_token",        "CLOUDFLARE_ACCOUNT_ID": "your_account_id"      }    }  }}

With Cursor

Add to your .cursor/mcp.json:

json
{  "mcpServers": {    "cloudflare": {      "command": "npx",      "args": ["-y", "mcp-server-cloudflare-dns"],      "env": {        "CLOUDFLARE_API_TOKEN": "your_api_token",        "CLOUDFLARE_ACCOUNT_ID": "your_account_id"      }    }  }}

Authentication

  1. Go to Cloudflare Dashboard > API Tokens
  2. Create a token with the permissions you need:
    • Zone:Read — for listing zones and DNS
    • Zone:Edit — for creating/deleting DNS records
    • Workers Scripts:Edit — for managing Workers
    • Workers KV Storage:Edit — for KV operations
    • Zone:Cache Purge — for cache purging
  3. Set CLOUDFLARE_API_TOKEN environment variable
  4. Set CLOUDFLARE_ACCOUNT_ID for Workers, KV, and R2 operations

Examples

Ask your AI assistant:

  • "List my Cloudflare zones"
  • "Show DNS records for zone xyz"
  • "Create an A record pointing to 1.2.3.4"
  • "List my Workers"
  • "Show KV keys in namespace abc"
  • "Purge the cache for https://example.com/page"
  • "List my R2 buckets"

Agent Plugins

This repo is an Agent Plugins 1.0.0 package: plugin.json, portable mcp.json, and skills/ ship together with the MCP server.

For Cursor, clone the repo and copy or symlink it to ~/.cursor/plugins/local/mcp-server-cloudflare, then reload the window. Skills and MCP show up under Customize > Plugins.

Agent Plugins v1 does not ship OAuth. Set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID in your MCP client env (see Quick Start). One-click install is not offered because credentials stay in env.

Install and run via npm package mcp-server-cloudflare-dns (not the unrelated mcp-server-cloudflare stub on npm).

FAQ

What npm package do I install?

Use npx -y mcp-server-cloudflare-dns. The repo is named mcp-server-cloudflare on GitHub; npm publishes as mcp-server-cloudflare-dns.

Which env vars are required?

CLOUDFLARE_API_TOKEN for all API calls. CLOUDFLARE_ACCOUNT_ID for Workers, KV, and R2 tools.

Can I install it as an Agent Plugin in Cursor?

Yes, via ~/.cursor/plugins/local/mcp-server-cloudflare. Configure the same env vars in Cursor MCP settings.

What can this MCP manage?

Zones and DNS, Workers scripts, KV namespaces, R2 bucket listing, and cache purge for a zone.

Why no one-click Cursor button?

API token and account id cannot be embedded in a portable install link. Use the JSON under Quick Start.

Development

bash
npm installnpm testnpm run build

Author

[Made by ofershap]

[LinkedIn] [GitHub]


README built with README Builder

License

MIT © Ofer Shapira

來源:README.md,提交 d9e1ea3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Cloudflare 整合