cloudflare-mcp

cloudflare-mcp

A high-performance MCP server providing AI assistants with read-only access to the Cloudflare ecosystem. Query your entire Cloudflare infrastructure using natural language through Claude, Cursor, or any MCP-compatible client.

Category
访问服务器

README

Cloudflare MCP API Server (Enterprise Edition)

Security: FedRAMP High Tools: 354 NIST 800-53 License: MIT

A high-performance Model Context Protocol (MCP) server providing AI assistants with read-only access to the Cloudflare ecosystem. Query your entire Cloudflare infrastructure using natural language through Claude, Cursor, or any MCP-compatible client. Inspired by mcp-server-cloudflare.

Security-First Design

This server implements NIST 800-53 Rev. 5 controls for FedRAMP High environments:

Control Implementation File
AU-12 (Audit Generation) All API calls logged with sensitive data redaction src/audit-logger.ts
SC-5 (DoS Protection) Token bucket rate limiting (100 burst, 10/sec) src/rate-limiter.ts
SI-10 (Input Validation) Zod schemas + GraphQL mutation blocking src/graphql-validator.ts
SI-11 (Error Handling) Safe error messages, no stack traces src/api-client.ts
IA-5(7) (Token Protection) XOR obfuscation in memory src/api-client.ts

Why Use This?

  • Infrastructure discovery: "What DNS records exist across all my zones?"
  • Security audits: "Which zones don't have WAF enabled?" or "Show me all rate limiting rules"
  • Troubleshooting: "What are the SSL settings for example.com?"
  • Documentation: Generate configuration reports by asking questions
  • Learning: Explore your Cloudflare setup without memorizing API endpoints

Features

  • 354 read-only tools covering the entire Cloudflare API surface (as of 2026-02-05)
  • Zero write operations - cannot modify any configurations (safe to use)
  • Natural language queries - ask questions, get answers
  • Built-in security - rate limiting, audit logging, token protection

API Coverage

Category Examples
Core Accounts, Zones, DNS, Settings
Security WAF, Firewall, Bot Management, Page Shield, DDoS
SSL/TLS Certificates, Universal SSL, Custom Certs, mTLS
Performance Argo, Cache, Load Balancing, Waiting Rooms
Zero Trust Access Apps, Gateway, Devices, Tunnels, DEX
Developer Platform Workers, Pages, D1, R2, KV, Queues, Durable Objects
Analytics Dashboard, GraphQL, Audit Logs
Enterprise Cloudforce One, Magic Transit, Spectrum, Custom Hostnames

Quick Start

1. Install

git clone https://github.com/pocc/cloudflare-mcp.git
cd cloudflare-mcp
npm install
npm run build

2. Create API Token

  1. Go to Cloudflare Dashboard → API Tokens
  2. Click Create Token
  3. Use Custom Token with read-only permissions:
    • Account Settings: Read
    • Zone: Read
    • Zone Settings: Read
    • DNS: Read
    • SSL and Certificates: Read
    • Firewall Services: Read
    • Analytics: Read
    • Access: Apps and Policies: Read
    • Worker Scripts: Read
    • Load Balancers: Read
    • (add more as needed for your use case)

3. Configure Your MCP Client

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "cloudflare": {
      "command": "node",
      "args": ["/path/to/cloudflare-mcp/dist/index.js"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

Cursor / Other MCP Clients

CLOUDFLARE_API_TOKEN="your-token" node dist/index.js

Example Queries

Once connected, ask natural language questions:

Discovery

  • "List all my zones and their status"
  • "What Workers do I have deployed?"
  • "Show me all Access applications"

Security Audit

  • "Which zones have bot management enabled?"
  • "What WAF rules are configured on example.com?"
  • "List all rate limiting rules across my account"
  • "Show audit logs from the last 24 hours filtered by user@example.com"

Troubleshooting

  • "What are the SSL settings for example.com?"
  • "Is Argo Smart Routing enabled on my zones?"
  • "What DNS records exist for api.example.com?"
  • "Show me the load balancer configuration for production"

Zero Trust

  • "List all Cloudflare Tunnel connections"
  • "What Access policies protect my apps?"
  • "Show Gateway network policies"
  • "What devices are registered in my Zero Trust org?"

Security

Feature Description
Read-Only Cannot create, update, or delete any resources
Rate Limited Built-in token bucket (100 burst, 10/sec)
Audit Logged All API calls logged with sensitive data redacted
Token Protected API token XOR-obfuscated in memory
Input Validated Zod schemas + GraphQL query validation

Best Practices:

  • Use the principle of least privilege when creating tokens
  • Never commit tokens to version control
  • Rotate tokens periodically

Documentation

Document Description
Architecture Technical design and data flow
API Reference Complete list of 354 tools
Security Review FedRAMP compliance details
Security Fixes NIST control implementations

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选