# ofershap/mcp-server-cloudflare [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/ofershap/mcp-server-cloudflare  
**GitHub Stars:** 4  
**npm Downloads (last month):** 193  
**Views:** 9  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ofershap-mcp-server-cloudflare

## Description
Manage Cloudflare Workers, KV, R2, Pages, DNS, and cache from your IDE.

## Tools
Capabilities this server exposes over MCP:

- **cf_zones** — List Cloudflare zones (domains)
- **cf_dns_list** — List DNS records for a zone
- **cf_dns_create** — Create a DNS record
- **cf_dns_delete** — Delete a DNS record
- **cf_workers_list** — List Workers scripts
- **cf_worker_delete** — Delete a Workers script
- **cf_kv_namespaces** — List KV namespaces
- **cf_kv_keys** — List keys in a KV namespace
- **cf_kv_get** — Get a value from KV
- **cf_kv_put** — Write a value to KV
- **cf_kv_delete** — Delete a key from KV
- **cf_r2_buckets** — List R2 buckets
- **cf_cache_purge** — Purge Cloudflare cache (all or specific URLs)

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-server-cloudflare": {
    "command": "npx",
    "args": ["-y","mcp-server-cloudflare-dns"],
    "env": {
      "CLOUDFLARE_API_TOKEN": "",
      "CLOUDFLARE_ACCOUNT_ID": ""
    }
  }
}
```

**Requires environment variables:** `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What ofershap/mcp-server-cloudflare does

The ofershap/mcp-server-cloudflare MCP server exposes selected Cloudflare account and zone operations to AI assistants through MCP. It can list zones and DNS records, create or delete DNS records, inspect or remove Workers scripts, and work with Workers KV namespaces and keys. KV support includes reading, writing, and deleting values. The server can also list R2 buckets and purge cache either globally or for specific URLs.

This is intended for operational tasks that can be expressed through the available Cloudflare tools, such as checking a domain’s records, reviewing deployed Workers, updating a KV value, or clearing a cached page.

## How it works

An MCP client starts the server with `npx -y mcp-server-cloudflare-dns`. The assistant then invokes the exposed tools with the relevant zone, namespace, record, key, bucket, or URL information. The server authenticates API calls using environment variables supplied by the client rather than an interactive sign-in flow.

Available operations are grouped by Cloudflare resource:

- Zones and DNS: enumerate zones, list records, and create or delete records.
- Workers: list scripts and delete scripts.
- KV: list namespaces, list keys, retrieve values, write values, and delete keys.
- R2 and cache: list buckets and purge all cache or selected URLs.

## Setup and configuration

Install and run the npm package named `mcp-server-cloudflare-dns`; this differs from the GitHub repository name and from an unrelated npm stub with a similar name. In Claude Desktop, add a `cloudflare` MCP entry to `claude_desktop_config.json`. In Cursor, add the equivalent entry to `.cursor/mcp.json`, using `npx` as the command and `-y`, `mcp-server-cloudflare-dns` as its arguments.

Set `CLOUDFLARE_API_TOKEN` for all API calls. Set `CLOUDFLARE_ACCOUNT_ID` when using Workers, KV, or R2 tools. The token should have permissions matching the operations you plan to perform: zone read or edit, Workers Scripts edit, Workers KV Storage edit, and Zone Cache Purge as applicable.

The repository also includes an Agent Plugins package. For Cursor, it can be cloned and copied or symlinked to `~/.cursor/plugins/local/mcp-server-cloudflare`, then enabled after reloading the window. Configure the same environment variables in the client.

## Tools and capabilities

The tool names are:

- `cf_zones`, `cf_dns_list`, `cf_dns_create`, and `cf_dns_delete`
- `cf_workers_list` and `cf_worker_delete`
- `cf_kv_namespaces`, `cf_kv_keys`, `cf_kv_get`, `cf_kv_put`, and `cf_kv_delete`
- `cf_r2_buckets` and `cf_cache_purge`

Together, these tools cover resource discovery, selected DNS and Workers changes, KV data operations, R2 bucket listing, and cache invalidation.

## Limitations and notes

The ofershap/mcp-server-cloudflare MCP server requires credentials in the MCP client environment. Agent Plugins v1 does not provide OAuth, and the repository does not offer a one-click Cursor installation because credentials cannot be embedded in a portable install link. Access is also constrained by the Cloudflare token permissions you grant. R2 support is documented as bucket listing, while the listed tools do not provide R2 object operations.

_Full upstream README: https://allmcps.com/mcp/ofershap-mcp-server-cloudflare/readme_

