Cloudflare MCP
Allows managing Cloudflare zones and DNS records, including listing, creating, updating, and deleting DNS records.
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 my zones"
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
Servidor MCP remoto (FastMCP + transporte streamable-http) para administrar Cloudflare. Fase 1: módulo domains (zonas y registros DNS).
Estructura
cfmcp/
server.py # instancia FastMCP + auth (GitHubProvider) + registro de tools + ASGI app
cf_client.py # AsyncCloudflare client (lee CLOUDFLARE_API_TOKEN)
domains/
zones.py # list_zones, get_zone
dns_records.py # list_dns_records, get_dns_record, create_dns_record, update_dns_record, delete_dns_record
requirements.txt
DockerfileRelated MCP server: Cloudflare API MCP
Autenticación
OAuth 2.1 vía GitHubProvider de FastMCP (fastmcp.server.auth.providers.github) — el camino que la propia documentación de FastMCP recomienda para producción (ver gofastmcp.com/servers/auth/authentication: "Full OAuth implementation should be avoided unless you have compelling reasons that external providers cannot address"). Necesario porque la UI de conectores de Claude Desktop / claude.ai solo acepta OAuth (no tiene campo para bearer token estático — ver issue #112).
GitHubProvider es un OAuthProxy: hace de puente entre GitHub (que no soporta Dynamic Client Registration) y clientes MCP como Claude Desktop (que sí la requieren) — incluye la pantalla de consentimiento nativa de FastMCP (ConsentMixin). Un AuthMiddleware adicional restringe el acceso a un único usuario de GitHub (ALLOWED_GITHUB_LOGIN) comparando token.claims["login"], ya que GitHubProvider no trae esa restricción integrada.
Limitación conocida (v1): el registro de clientes OAuth (client_storage) vive en un archivo local dentro del contenedor (sin volumen persistente) — un restart/redeploy borra los clientes/tokens registrados y Claude Desktop necesita reconectar. Mejora futura: montar un volumen persistente.
Crear la GitHub OAuth App
GitHub → Settings → Developer settings → OAuth Apps → New OAuth App.
Homepage URL:
https://cfmcp.clicestrategico.comAuthorization callback URL:
https://cfmcp.clicestrategico.com/auth/callback(path por defecto deGitHubProvider)Generar el Client Secret y guardar ambos valores.
Variables de entorno
CLOUDFLARE_API_TOKEN— token de Cloudflare conZone→Zone→ReadyZone→DNS→Edit, scoped a zonas específicas.MCP_BASE_URL— URL pública del servidor (ej.https://cfmcp.clicestrategico.com), debe coincidir con la callback URL registrada en GitHub.GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET— de la GitHub OAuth App.ALLOWED_GITHUB_LOGIN— único username de GitHub autorizado a usar el servidor.FASTMCP_HTTP_ALLOWED_HOSTS/FASTMCP_HTTP_ALLOWED_ORIGINS— obligatorio en producción, formato lista JSON (ej.["cfmcp.clicestrategico.com"]). FastMCP bloquea con 421 cualquier Host que no sea loopback por defecto (protección DNS-rebinding).
Desarrollo local
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
CLOUDFLARE_API_TOKEN=xxx MCP_BASE_URL=http://127.0.0.1:8000 GITHUB_CLIENT_ID=xxx GITHUB_CLIENT_SECRET=xxx ALLOWED_GITHUB_LOGIN=tu-usuario uvicorn cfmcp.server:app --host 0.0.0.0 --port 8000Docker
docker build -t cloudflare-mcp .
docker run -p 8000:8000 --env-file .env cloudflare-mcpDespliegue en Dokploy
Va en el proyecto "Remote MCP" existente (junto a Namecheap MCP y Google Drive MCP), mismo patrón: repo GitHub + buildType: dockerfile + dominio en *.clicestrategico.com.
Crear la app en Dokploy (
application-create) en el environment de "Remote MCP".Conectar el repo vía
application-saveGitProvider(nosaveGithubProvider— esa requiere una GitHub App integration configurada en Dokploy, que no existe aquí;saveGitProviderconcustomGitUrlfunciona directo contra el repo público).application-saveBuildType(dockerfile).Env vars vía la UI de Dokploy (el endpoint
application-saveEnvironmentde la API falló consistentemente con 400 al llamarlo programáticamente — pegar manualmente en Environment funciona bien).application-deploy.domain-createcon el dominio real (certificateType: letsencrypt).
Tools disponibles (módulo domains)
list_zones,get_zonelist_dns_records,get_dns_record,create_dns_record,update_dns_record,delete_dns_record
Roadmap
Registrar (dominios comprados vía Cloudflare Registrar): listar/consultar, auto_renew/locked/privacy
Volumen persistente para el client_storage de OAuth
Workers Bindings (KV, R2, D1)
Cache Purge / reglas WAF
Pages
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/codigoreactivo/cloudflare-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server