Cloudflare MCP
Provides a guarded generic Cloudflare REST API request tool and utilities for checking configuration, listing capabilities, and querying endpoint coverage, enabling interaction with Cloudflare services via their official API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare MCPlist DNS records for my zone example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare MCP
Portal-safe Cloudflare MCP server for MADPANDA3D.
This service is built for the MAD MCP Portal access path. Agents should call it
through the portal broker, not directly. Every MCP tool call must include the
portal grant header. Cloudflare credentials should be supplied by the broker with
x-cloudflare-api-token; local CLOUDFLARE_API_TOKEN is only a fallback.
MCP protocol requests are rejected fail-closed when X-MADPANDA-PORTAL-GRANT
is missing or does not match MCP_PORTAL_GRANT_TOKEN; /health remains
unauthenticated for routing and container smoke checks.
Runtime
Python 3.12
FastMCP HTTP transport at
/mcpHealth route at
/healthDocker Compose service:
cloudflare-mcpContainer name:
cloudflare-mcpNetwork: external
mcp-networkPublic hostname:
cfmcp.madpanda3d.com
Related MCP server: Cloudflare API MCP
Required Headers
Header | Required | Purpose |
| Yes | Must match |
| Yes for Cloudflare API calls | Cloudflare Bearer token for the current user/account. Falls back to |
| Optional | Default account scope hint for agents and workflows. |
| Optional | Default zone scope hint for agents and workflows. |
Environment
Copy .env.example to .env for local/container deployment and fill in only
real deployment values. Set MCP_EXPECT_PORTAL_CLOUDFLARE_TOKEN=true when the
portal supplies Cloudflare credentials through broker headers. Never commit
.env.
Tools
check_configuration: validates portal/provider setup without exposing secrets.list_capabilities: lists tool groups, risk levels, and common workflows.get_endpoint_coverage: queries the generated Cloudflare endpoint matrix.get_tool_usage: explains safe usage and side effects for each tool.cloudflare_api_request: guarded generic Cloudflare REST API request tool.
cloudflare_api_request covers the stable Cloudflare REST operations present in
the official Cloudflare OpenAPI schema. Mutating methods require
confirm_write=true; destructive methods and schema-classified destructive
operations also require confirm_destructive=true.
Local Development
uv is preferred when available:
uv sync --extra dev
uv run pytest
uv run ruff check .
uv run mypyFallback with the system Python:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
pytest
ruff check .
mypyRun locally:
cloudflare-mcp
curl http://127.0.0.1:8000/healthDocker
docker-compose up -d --build cloudflare-mcp
docker-compose ps
curl http://127.0.0.1:8000/healthThe compose file intentionally exposes the service only on mcp-network for
nginx-proxy-manager or MAD MCP Portal routing.
Public routing target:
https://cfmcp.madpanda3d.com/mcp -> nginx-pm -> cloudflare-mcp:8000Endpoint Coverage
Coverage is generated from Cloudflare's official OpenAPI schema repository:
https://github.com/cloudflare/api-schemas.
Regenerate:
curl -L --fail --silent --show-error \
-o /tmp/cloudflare-openapi.json \
https://raw.githubusercontent.com/cloudflare/api-schemas/main/openapi.json
python scripts/build_endpoint_coverage.py /tmp/cloudflare-openapi.jsonSee docs/endpoint-coverage.md for the generated matrix.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/MADPANDA3D/CF-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server