cf-control-mcp
Provides tools for managing a Cloudflare account, including zones, DNS records, Workers, and KV namespaces.
Provides tools for listing and inspecting Cloudflare Worker scripts and their metadata.
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., "@cf-control-mcplist my Cloudflare zones and 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.
cf-control-mcp
A private remote MCP server deployed on Cloudflare Workers for inspecting and managing a Cloudflare account. It supports Streamable HTTP at /mcp, OAuth discovery + PKCE for ChatGPT-compatible clients, and the original owner bearer-token path for legacy/desktop use.
Security model
There are two separate credential layers:
Client → MCP Worker — OAuth 2.1-style authorization with PKCE and explicit owner approval. The existing
MCP_AUTH_TOKENis used as the owner approval secret and as the HMAC root key for stateless OAuth artifacts.MCP Worker → Cloudflare API —
CLOUDFLARE_API_TOKEN, stored only as a Worker secret. It is never returned to MCP clients.
Rotating MCP_AUTH_TOKEN invalidates previously registered OAuth clients, authorization codes, access tokens, refresh tokens, and the legacy bearer credential.
Related MCP server: Remote MCP Server on Cloudflare
Deploy
npm install
wrangler login
openssl rand -hex 32
wrangler secret put MCP_AUTH_TOKEN
wrangler secret put CLOUDFLARE_API_TOKEN
wrangler secret put CLOUDFLARE_ACCOUNT_ID
npm run deployThe production MCP endpoint is:
https://cf-control-mcp.amin-chinisaz-edu.workers.dev/mcpwrangler.jsonc routes the Worker through src/oauth-worker.ts, which wraps the existing MCP implementation in src/index.ts.
OAuth endpoints
The Worker exposes the metadata and endpoints required by an OAuth-capable MCP client:
Endpoint | Purpose |
| Protected-resource metadata |
| Authorization-server metadata |
| Dynamic client registration |
| PKCE authorization + explicit owner approval page |
| Authorization-code and refresh-token exchange |
| Streamable HTTP MCP endpoint |
OAuth public clients must use PKCE with S256. The authorization page displays the requesting client and redirect URI, then requires the owner approval token before issuing an authorization code.
The OAuth scopes are:
mcp:readoffline_access
offline_access enables refresh tokens so clients can maintain connectivity without repeating authorization every hour.
ChatGPT Web / Pro
Use the MCP URL only:
https://cf-control-mcp.amin-chinisaz-edu.workers.dev/mcpWhen ChatGPT Web has Custom MCP / Developer Mode available for the account, it should discover OAuth from the MCP 401 challenge and .well-known metadata, dynamically register itself, open the /authorize approval page, and complete PKCE after owner approval.
For OAuth-connected clients, the server intentionally exposes read-only tools only. This matches the current ChatGPT Pro custom-MCP read/fetch capability and prevents write actions from leaking into the Pro connection.
OAuth-visible tools
Tool | Purpose |
| List zones/domains |
| List DNS records |
| List Workers |
| Inspect Worker metadata |
| List KV namespaces |
| Read a KV key |
Write tools are filtered from OAuth tools/list and are blocked server-side if called with an OAuth access token.
Legacy owner-token access
The original direct bearer-token path is retained for trusted desktop/CI clients. Supplying the exact MCP_AUTH_TOKEN as the bearer token bypasses the OAuth flow and exposes the full existing toolset.
curl -X POST https://cf-control-mcp.amin-chinisaz-edu.workers.dev/mcp \
-H "Authorization: Bearer <MCP_AUTH_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Full legacy toolset
Tool | What it does | Destructive? |
| List domains on the account | no |
| List DNS records for a zone | no |
| Create a DNS record | yes |
| Delete a DNS record | yes |
| Purge edge cache | yes |
| List deployed Worker scripts | no |
| Get Worker bindings/routes metadata | no |
| List Workers KV namespaces | no |
| Read a KV key | no |
| Write a KV key | yes |
Verification
Typecheck locally:
npx tsc --noEmitThe deployment workflow also runs scripts/oauth_smoke.py against the live Worker. The smoke test verifies:
OAuth protected-resource discovery
authorization-server discovery
Dynamic Client Registration
PKCE
S256explicit consent/approval page
authorization-code exchange
refresh-token grant
read-only OAuth
tools/listserver-side blocking of write tools for OAuth clients
legacy owner-token compatibility
unauthenticated
401withWWW-Authenticateresource metadata
The smoke test never prints the owner secret or issued OAuth tokens.
Plugin package
The repository also contains an OpenAI/Codex plugin package under plugins/cf-control and marketplace metadata under .agents/plugins/marketplace.json.
The direct .mcp.json plugin package is useful for MCP-capable desktop environments. ChatGPT Web custom-app availability still depends on the account exposing Developer Mode / Custom MCP UI; the repository does not invent or hard-code a fake ChatGPT App ID.
Operational notes
Scope
CLOUDFLARE_API_TOKENto only the Cloudflare permissions required by the tools you intend to use.Keep all secrets in Worker/GitHub secret stores, never in the repository.
The OAuth authorization artifacts are stateless and short-lived; PKCE binds authorization codes to the initiating client.
MCP_AUTH_TOKENrotation is the emergency revocation mechanism for all client-side access.Workers observability remains enabled in
wrangler.jsonc.
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.
Related MCP Connectors
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA Cloudflare-deployable server that implements Model Context Protocol (MCP) capabilities, allowing AI assistants like Claude to access custom tools via OAuth authentication flows.
- FlicenseNot gradedqualityCmaintenanceEnables deploying a Model Context Protocol (MCP) server on Cloudflare Workers with built-in OAuth authentication. It allows local clients like Claude Desktop to securely connect to and use remote tools through an HTTP/SSE transport.
- AlicenseNot gradedqualityCmaintenanceEnables deploying and connecting to MCP servers on Cloudflare Workers with OAuth login, allowing remote access to tools via MCP clients like Claude Desktop.225MIT
- FlicenseNot gradedqualityCmaintenanceEnables deploying a remote MCP server on Cloudflare Workers with OAuth, allowing MCP clients like Claude Desktop to call tools over the internet.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/nimazasinich/cf-control-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server