# Cloudflare MCP

> Cloudflare's official MCP servers — a Code Mode server covering 2,500 API endpoints in ~1k tokens, plus hosted servers for docs, Workers, and observability.

Cloudflare ships two kinds of official MCP servers, all hosted: 16 domain servers (docs, Workers bindings and builds, observability, browser rendering, Radar, and more at <name>.mcp.cloudflare.com/mcp) and the newer Code Mode server at mcp.cloudflare.com/mcp, which exposes the entire 2,500-endpoint Cloudflare API in about 1k tokens by letting the agent write code against the API spec server-side.

Website: https://developers.cloudflare.com/agents/model-context-protocol/mcp-servers-for-cloudflare/

Cloudflare's MCP lineup is the most architecturally interesting of the official vendor servers — two complementary designs. The **domain servers** (16 of them, each hosted at `<name>.mcp.cloudflare.com/mcp`) give typed, guided tools for one area: docs, Workers bindings and builds, observability, browser rendering, Logpush, AI Gateway, Radar, and more. The **Code Mode server** flips the model: the entire 2,500-endpoint Cloudflare API in ~1k tokens of context, because the agent writes code against the API spec — executed server-side — instead of loading a tool schema per endpoint.

## Highlights

- **Code Mode breadth** — `mcp.cloudflare.com/mcp` covers the whole API at a fraction of the context cost; `?codemode=false` restores per-endpoint tools when you want them.
- **Domain servers for depth** — Documentation, Workers Bindings, Workers Builds, Observability, Browser Rendering, AI Gateway, Audit Logs, DNS Analytics, Radar, AutoRAG, and more.
- **All hosted, OAuth on connect** — or a Cloudflare API token as a Bearer header for automation.
- **First-class Claude Code packaging** — the `cloudflare/skills` marketplace installs the server *and* skills in one `/plugin install`.
- **Open source** — both repos are Apache-2.0, useful as reference implementations for [remote MCP servers](/guides/mcp/deploy-remote-mcp-server) generally.

## In an AI-assisted workflow

```bash
/plugin marketplace add cloudflare/skills
/plugin install cloudflare@cloudflare
# then:
# > Why are p99s spiking on the api-gateway Worker since yesterday's deploy?
# > Check observability and the build history.
```

The debugging loop is the killer app: observability data, build logs, and current docs in one place, so the agent diagnoses against telemetry instead of theory.

> [!TIP]
> Mind the context budget with domain servers — the observability server in particular can chain many tool calls on a broad question (Cloudflare's own troubleshooting note). Scope questions tightly, or lean on Code Mode, which was built to keep context small.

## Good to know

Connecting is free with a Cloudflare account; some underlying features need a paid Workers plan. SSE endpoints are deprecated in favor of `/mcp` Streamable HTTP. API tokens used for headless auth need at least "Account Resources: Read", and tokens with IP-address filtering aren't supported. The Code Mode design is worth studying even if you don't use Cloudflare — it's the strongest public answer yet to MCP tool-schema bloat.

---

_Source: https://agentscamp.com/tools/cloudflare-mcp — Tool on AgentsCamp._
