CL

Cloudflare MCP Server for LLM Integrations

Connect Cloudflare with LLMs using an MCP server to manage context and execute tasks via natural language through your Cloudflare account.

Quick Install
npx -y @cloudflare/mcp-server-cloudflare

Overview

The Cloudflare MCP Server collection implements the Model Context Protocol (MCP) endpoints that let LLM-powered MCP clients (for example Cursor or Claude) interact with Cloudflare product data and services. These servers expose curated, typed tools for common Cloudflare tasks — reading configuration, surfacing telemetry, suggesting configuration changes, and optionally applying them — so an LLM can operate against your Cloudflare account using natural language.

You can either use Cloudflare’s hosted domain-specific MCP endpoints (one server per product area) or run the repository locally to expose MCP endpoints to your own MCP client. The servers support the newer streamable-http transport via /mcp (recommended) and also provide a legacy SSE /sse transport. Authentication is done through your Cloudflare account credentials or API token, and the servers are designed for secure, least-privilege integration with your existing Cloudflare setup.

Features

  • Domain-specific MCP servers for Cloudflare product areas (Workers, Observability, DNS analytics, Radar, Browser Rendering, etc.)
  • Streamable HTTP transport endpoint (/mcp) for robust streaming interactions with LLM clients
  • Typed, purpose-built tools that let LLMs read data, prepare suggestions, and request changes
  • Hosted endpoints you can point an MCP-capable client at, or code you can run locally
  • Support for reading account configurations, logs, analytics, builds, and more

Installation / Configuration

Two common ways to use the Cloudflare MCP servers: point your MCP client at the hosted domain-specific endpoints, or run the repository locally.

Quick start — use hosted servers

  • In an MCP-capable client (for example a client that accepts a remote MCP server URL), add one of the domain-specific URLs (see Available Resources).
  • Authenticate the client with a Cloudflare API token or the client’s built-in Cloudflare integration if required.

Run from source (local development)

  1. Clone the repository:
git clone https://github.com/cloudflare/mcp-server-cloudflare.git
cd mcp-server-cloudflare
  1. Install dependencies and run the dev server (project uses Node tooling in many app folders):
# from repo root; specific apps may have their own package.json
npm install
npm run dev
  1. Provide Cloudflare credentials via environment variables:
export CLOUDFLARE_API_TOKEN="your_api_token_here"
export CLOUDFLARE_ACCOUNT_ID="your_account_id_here"
  1. Point your MCP client at the local /mcp endpoint:
http://localhost:3000/mcp

Security notes

  • Create a Cloudflare API token with the minimum permissions required for the product area(s) your MCP server will access.
  • Never embed long-lived global API keys in client-side code; use server-side secrets or short-lived tokens.

Example: open a streaming request to a hosted MCP server

export CLOUDFLARE_API_TOKEN="..."
curl -N -X POST "https://docs.mcp.cloudflare.com/mcp" \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"example-model","prompt":"Summarize configuration for my Workers"}'

Note: /mcp is the streamable-http transport; /sse is the older SSE transport (deprecated).

Available Resources

The repository includes multiple domain-specific MCP servers. Below are the main hosted endpoints and a brief purpose for each:

ServerPurposeEndpoint
Documentation serverReference docs and up-to-date Cloudflare product informationhttps://docs.mcp.cloudflare.com/mcp
Workers BindingsInspect and manage Workers bindings (storage, AI, compute primitives)https://bindings.mcp.cloudflare.com/mcp
Workers BuildsInspect and manage Workers build pipeline and buildshttps://builds.mcp.cloudflare.com/mcp
ObservabilityDebugging, logs, and analytics for your appshttps://observability.mcp.cloudflare.com/mcp
RadarGlobal traffic trends, URL scans, and network insightshttps://radar.mcp.cloudflare.com/mcp
Container (sandbox)Create and manage sandboxed development containershttps://containers.mcp.cloudflare.com/mcp
Browser RenderingFetch pages, convert to Markdown, and take screenshots