cloudflare-mcp
Provides tools for managing DNS records and Cloudflare Tunnels in a Cloudflare zone.
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 all DNS records"
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
A tiny TypeScript MCP server to manage the DNS records of a Cloudflare zone through the Cloudflare API. Zone-agnostic: point it at any zone via env vars.
Requirements
Node.js 18+
A Cloudflare API token. Permissions by feature:
DNS tools →
Zone:DNS:Edit(+Zone:Readto resolve the zone by name)Tunnel tools →
Account:Cloudflare Tunnel:Edit(+Account:Account Settings:Readto auto-resolve the account id)
Related MCP server: Cloudflare MCP Server
Configuration
Variable | Description |
| Cloudflare API token (see permissions above) |
| The 32-char hex Zone ID or the zone name (e.g. |
| Optional. Account id for tunnel tools. Auto-resolved from the token if omitted (needs |
Copy .env.example to .env and fill it in. Never commit .env.
Scripts
npm install
npm run build # emit dist/
npm run dev # tsx src/index.ts (stdio)
npm start # node dist/index.jsTools
Tool | Description |
| List all DNS records in the zone (optional |
| Get a record by name (e.g. |
| Create a record (type, name, content, proxied, ttl) |
| Update content/proxy of an existing record by name |
| Delete a record by name |
| List cloudflared tunnels in the account |
| Create a remotely-managed tunnel (idempotent by name); returns its run token |
| Get the run token for an existing tunnel |
| Set a tunnel's public-hostname ingress (hostname → local service) |
| Delete a tunnel by name |
Stand up a tunnel end-to-end
tunnel_create name=my-dev → returns id + token
tunnel_configure name=my-dev hostname=dev.example.com service=http://localhost:8770
dns_create type=CNAME name=dev.example.com content=<id>.cfargotunnel.com
# then run it locally (no cert.pem needed):
# TUNNEL_TOKEN=<token> cloudflared tunnel runExample (via an MCP client)
dns_list → all records
dns_get name=app.example.com → inspect one record
dns_create type=CNAME name=dev.example.com content=<tunnel-id>.cfargotunnel.com
dns_update name=dev.example.com proxied=true
dns_delete name=old.example.comUse as an MCP server
Point your MCP client at the built or dev entrypoint over stdio, passing the two env vars. Example (generic MCP config):
{
"command": "npx",
"args": ["-y", "tsx", "/absolute/path/to/cloudflare-mcp/src/index.ts"],
"env": {
"CLOUDFLARE_API_TOKEN": "<your-token>",
"CLOUDFLARE_ZONE_ID": "example.com"
}
}License
MIT
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
- 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/tecnomanu/cloudflare-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server