Cloudflare MCP server

Official remote Code Mode server for discovering Cloudflare API endpoints and executing account-scoped requests. Authorize the permissions you need through OAuth.

Remote (HTTP)OAuth

Set up Cloudflare Code Mode

Configuration examples, not tested connections. Replace placeholders and review the upstream documentation before use.

Claude Code

Run in your terminal.

claude mcp add --transport http cloudflare https://mcp.cloudflare.com/mcp

Cursor

Merge into ~/.cursor/mcp.json

{
  "mcpServers": {
    "cloudflare": {
      "url": "https://mcp.cloudflare.com/mcp"
    }
  }
}

Codex

Run in your terminal.

codex mcp add cloudflare --url https://mcp.cloudflare.com/mcp
codex mcp login cloudflare

Gemini CLI

Merge into ~/.gemini/settings.json

{
  "mcpServers": {
    "cloudflare": {
      "httpUrl": "https://mcp.cloudflare.com/mcp"
    }
  }
}

OpenCode

Merge into ~/.config/opencode/opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "cloudflare": {
      "type": "remote",
      "url": "https://mcp.cloudflare.com/mcp",
      "enabled": true
    }
  }
}

VS Code

Merge into .vscode/mcp.json

{
  "servers": {
    "cloudflare": {
      "type": "http",
      "url": "https://mcp.cloudflare.com/mcp"
    }
  }
}

Using more than one server?Add to a config with other servers

Step-by-step setup guides: Claude Code and Codex CLI, Cursor and VS Code. In Claude Desktop, add the URL as a custom connector. This is a remote server with OAuth sign-in; see remote vs local servers and authentication and security basics.

Overview

Cloudflare's official API MCP server connects an AI client to Cloudflare products at https://mcp.cloudflare.com/mcp. It uses Code Mode: search finds API operations, execute calls them, docs searches developer documentation, and whoami identifies the connected account. The API surface changes upstream; these are connection examples, not a claim that every account can use every operation.

Choose this server when the task concerns your Cloudflare account. It can inspect resources and, with the permissions you grant, change them. Cloudflare recommends OAuth for interactive clients. The client opens the authorization flow, where you select permissions. For automation, upstream also supports an API token in the Authorization bearer header. Account tokens need Account Resources: Read for account detection; client-IP-filtered tokens are not supported.

The separate Docs server searches public documentation without an account. It cannot replace the authorized API connection when you need account data. Product-specific servers cover narrower tasks; several older endpoints are deprecated, so check the comparison below before copying an old configuration. Hosting your own MCP server on Workers is another task entirely. For client configuration, follow the VS Code MCP guide or return to the public Cloudflare Docs setup.

Which Cloudflare MCP server?

Cloudflare maintains this endpoint list. For an application that serves your own tools, use the Cloudflare guide to building a remote MCP server.

Which Cloudflare MCP server?
ServerURLUse and status
API / Code Modehttps://mcp.cloudflare.com/mcpAuthorized Cloudflare account operations; recommended general API connection.
Documentationhttps://docs.mcp.cloudflare.com/mcpPublic developer-doc search; no account needed.
Browser Runhttps://browser.mcp.cloudflare.com/mcpBrowser tasks and screenshots.
Containershttps://containers.mcp.cloudflare.com/mcpSandbox development environments.
Workers Bindingshttps://bindings.mcp.cloudflare.com/mcpDeprecated upstream; migrate to the API server.
Workers Buildshttps://builds.mcp.cloudflare.com/mcpDeprecated upstream; migrate to the API server.
Observabilityhttps://observability.mcp.cloudflare.com/mcpDeprecated upstream; migrate to the API server.

Frequently asked questions

Which URL is the Cloudflare MCP API server?

Use https://mcp.cloudflare.com/mcp with OAuth or an API token. The public Docs endpoint is a separate documentation-search service.

Can this server change my Cloudflare account?

The execute tool can make API changes within the permissions you grant. Select permissions appropriate to the task and review proposed operations.

Example tools

  • search
  • execute
  • docs

Tool names are upstream examples. The server's live tool list can differ.

Browse Cloud servers

Sources

This page was written from the upstream documentation below and last reviewed on 6 November 2026. Listing is not a security or compatibility endorsement. Report a correction through the contact page.