Cloudflare MCP Server

The official Python library for the cloudflare API

Local serverstdioPython

What is the Cloudflare MCP Server?

The official Python library for the cloudflare API

What you get

The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.9+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.

Configuration and credentials

Python 3.9 or higher.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Cloudflare MCP Server

{
  "mcpServers": {
    "cloudflare-1": {
      "command": "uvx",
      "args": ["cloudflare"],
      "env": {
        "CLOUDFLARE_LOG": "your-value",
        "CLOUDFLARE_API_TOKEN": "your-value",
        "CLOUDFLARE_BASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

Python 3.9 or higher.

VariableDescriptionRequired
CLOUDFLARE_LOGConfiguration value read at startup.Optional
CLOUDFLARE_API_TOKENCredential the server authenticates with.Yes
CLOUDFLARE_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Cloudflare to Retries.”
  • “Use Cloudflare to Timeouts.”
  • “Use Cloudflare to Logging.”

Frequently asked questions

The official Python library for the cloudflare API Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.