Developer Tools

Cloudflare MCP server: scoped account access for every agent

Cloudflare MCP gives an agent the official remote tool surface for exploring Cloudflare documentation and APIs and executing account operations. AIPx connects through OAuth and exposes the discovered tools with per-agent rules; code-mode execution remains one mixed read/write boundary.

Updated 14 October 2026 4 highlighted tools 3 read · 1 write

What your agent can do with Cloudflare

The verified live tools are docs, search, whoami and execute. Documentation and endpoint discovery can be used without an account-changing operation. execute runs JavaScript against the API and can perform reads or writes, so we recommend Confirm for the entire call, even when the intended request is a read.

Tool What it does Access Mode
docs Search Cloudflare docs read Allow
search Find endpoints in OpenAPI read Allow
whoami Authenticated user/account identity read Allow
execute Run JavaScript against Cloudflare API write Confirm

Source labels describe the checked connection. Live discovery and provider access determine availability; account-specific agent names may be normalized. Modes in this table are recommendations, not a change to upstream permissions.

Capability snapshot: 14 October 2026 · provider source

Start with endpoint discovery and identity. An agent can find the API operation relevant to a zone or Worker, then show which authenticated account it will use. Do not let a familiar resource name substitute for an account ID. Infrastructure names are often repeated across development and production.

Code mode reduces the visible tool surface by making execution a programmable operation. That is useful for joining several API reads, but it also means a gateway cannot put separate switches around every internal endpoint the JavaScript calls. The review unit is the complete execute invocation.

For diagnosis, ask the agent to collect relevant documentation, identify the intended API requests and explain the expected result before execution. Repeatable production changes are usually better expressed as infrastructure configuration in version control, with a diff and deployment process you can review.

Official Cloudflare MCP servers vs AIPx

ConnectionTool ownershipBest fit
Official remote CloudflareCloudflare hosts the MCP serviceOne client and vendor-managed access
Official implementation or separate serverTools depend on the selected serverA specific hosting or tool requirement
Cloudflare through AIPxOfficial tools behind the gatewayShared connections with different agent rules

The official Cloudflare MCP project describes the current code-mode surface. The Cloudflare MCP documentation explains the protocol and hosting options, while the server repository covers another official implementation. These references do not mean every server exposes identical tools.

A direct official connection avoids another service processing infrastructure requests. AIPx is useful when Cloudflare shares an agent with GitHub, Supabase or other services, but provider permissions and account limits still apply.

Connect Cloudflare to Claude Code, Cursor or Codex

Connect Cloudflare with OAuth and inspect the authenticated account and discovered code-mode tools before granting execution.

  1. Open the AIPx dashboard, choose Cloudflare under Integrations and complete its connection form or authorization.
  2. Create an MCP agent, enable that connection and choose the tools this particular agent needs. Save the rules before opening your AI client.
  3. Copy the agent’s complete URL. The examples below use AGENT_ID; replace it with the actual value from your dashboard.

An endpoint identifies the AIPx agent, not a provider API key. Client authentication to AIPx is separate from connecting Cloudflare; adding the URL does not grant extra provider permissions. Our MCP gateway guide explains how several approved connections can share that endpoint.

Connect Claude to Cloudflare

In Claude, open Customize → Connectors and add a custom connector with your AIPx URL. Continue through AIPx sign-in, then check the tools available in a conversation. Custom connector access depends on account and workspace policy; administrators can restrict it. The Claude MCP setup guide covers the current controls. A direct vendor connection can be simpler when Cloudflare is the only service you need.

Cloudflare MCP in Claude Code

claude mcp add --transport http aipx https://dash.aipx.run/mcp/AGENT_ID

Run /mcp to authorize, then use whoami and documentation search before account execution. Review the complete JavaScript for any later execute call. See Claude Code MCP setup for scope and login.

Cloudflare MCP in Cursor

Add this server to .cursor/mcp.json for the project or ~/.cursor/mcp.json for your user:

{
  "mcpServers": {
    "aipx": { "url": "https://dash.aipx.run/mcp/AGENT_ID" }
  }
}

Sign in to AIPx from Cursor and inspect Cloudflare account identity before diagnostics. Code-mode execute deserves approval even for a planned read. The Cursor MCP guide covers those client controls.

Cloudflare MCP in Codex

codex mcp add aipx --url https://dash.aipx.run/mcp/AGENT_ID
codex mcp login aipx
codex mcp list

Codex uses the HTTP endpoint and browser OAuth; it does not need a copy of the Cloudflare credential in its config. See Codex MCP setup for TOML configuration and project trust requirements.

A ChatGPT account with custom MCP access can inspect Cloudflare documentation through this URL. Hide execute if the job needs no account API calls. ChatGPT MCP setup describes current account and administrative restrictions.

Scope Cloudflare per agent: changes on Confirm

A documentation assistant can have docs and search on Allow with execute hidden. An infrastructure investigator may also need whoami. An operator who needs execution can use Confirm, but must review the full JavaScript and keep approvals enabled in the client.

This recommendation applies even to a script containing only reads, because the same tool can write. The product’s general read/write defaults cannot split that mixed tool into many internal API permissions. If your client ignores approval hints, Hide is the useful restriction. See MCP access control.

Cloudflare MCP gateway vs an MCP gateway like AIPx

Cloudflare provides tools and infrastructure for building and hosting MCP services. AIPx is an MCP gateway that presents already connected service tools through an agent-specific endpoint. Connecting the Cloudflare integration grants access to its discovered account tools; it does not deploy a new MCP gateway into your Cloudflare account.

You can use Sentry for error context and PostHog for product evidence while Cloudflare supplies infrastructure context. Keep those connections independently restricted so reading an incident does not also enable infrastructure changes.

Cloudflare account and execution limits

The OAuth user’s Cloudflare access is still decisive. AIPx does not create a resource-scoped authorization boundary inside an execute call. Use appropriately restricted provider access when a zone or account must remain unreachable, then choose the gateway tool modes for the task.

An endpoint search result is a plan, not a completed operation. Keep the API response and error context in the diagnosis so a failed execution is not presented as a successful change. For production infrastructure, preserve the deployment workflow and reviewable configuration rather than treating an interactive MCP session as a replacement for it.

Browse all MCP integrations to choose another connection for this agent.

The Cloudflare connection can use AIPx Free with 3 active accounts and 1 agent; check AIPx pricing for gateway plans and keep provider or client charges separate.

AIPx permission matrix for two Gmail accounts, with per-tool Allow, Confirm and Hide modes
Two Gmail accounts on one agent, each with its own Allow, Confirm and Hide rules. Allow and Confirm are client execution hints; Hide removes the tool from this agent.
Connect Cloudflare once for your agents
Choose the account, enable the needed tools and review the first result.
Connect Cloudflare free

What to ask your agent

Name the Cloudflare account and a bounded task. Ask for source identifiers and a proposed result before approving a change.

> Use documentation search to explain which Worker API can inspect this deployment, without executing account calls.
> Run whoami and identify the intended account before any resource lookup.
> Find the API operation for reading this zone configuration and show the planned request.
> Prepare a read-only diagnostic script for this Worker and show it before execute.
> Compare the Cloudflare error context with the linked Sentry issue; do not change either system.
> Draft an infrastructure configuration change in the repository rather than applying it directly.

FAQ

Can I connect Cloudflare to Claude?

Yes. Connect Cloudflare in AIPx, create an MCP agent and add its copied URL as a Claude custom connector when your account and workspace permit. Choose tools before using the connection.

How do I add Cloudflare MCP to Claude Code?

Run claude mcp add --transport http aipx https://dash.aipx.run/mcp/AGENT_ID with your actual agent endpoint, then use /mcp to authorize and inspect tools. See Claude Code MCP setup.

Is the Cloudflare integration free?

AIPx Free includes 3 active connected accounts and 1 agent; Pro is $3/month. Provider subscriptions, API charges and the AI client's own connector access are separate. See AIPx pricing.

Can I connect two Cloudflare accounts?

Yes. Add separately authorized Cloudflare connections and choose each account's tools independently for the agent. One endpoint can include both; it does not merge accounts or synchronize provider data.

Can my agent change Cloudflare data?

Yes, through the mixed execute tool when the upstream token has the required permissions. Confirm covers the complete invocation, including any nested calls; Hide execution if changes must be impossible through that tool.

When should I use the official Cloudflare connection?

Use a direct vendor connection when one service and one client meet your needs and you prefer fewer services handling data. For an API-only service, that can mean using the official API or a compatible server you maintain. AIPx adds shared connections and agent-specific rules.

Other integrations