Cloudflare MCP Go logo

Cloudflare MCP Go

by M-Yamashita01

Cloudflare API v4 server: 28 tools across zones, DNS, WAF/firewall, rate limits, HTTP request logs, Security Center insights, and threat intelligence (IP/domain/ASN/WHOIS/passive DNS). Currently read-only. Install with go run github.com/M-Yamashita01/cloudflare-mcp-go@latest.

Install Cloudflare MCP Go

Run the project’s own setup commands, in order.

Setup steps from the project

M-Yamashita01/cloudflare-mcp-go installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to Claude Code
    claude mcp add cloudflare \
      -e CLOUDFLARE_API_TOKEN=your-api-token \
      -- go run github.com/M-Yamashita01/cloudflare-mcp-go@latest
    

Overview

Tools80

What Cloudflare MCP Go lets your agent do. Expand a tool for its parameters.

Self-reported~1.7k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 50d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit8d agoMost recent push to the default branch.
Tools exposed80Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

cloudflare-mcp-go

Go Reference Go Version Latest Release Glama score

An MCP (Model Context Protocol) server for the Cloudflare API v4, written in Go.

It lets any MCP client (Claude, and other MCP-compatible tools) inspect and investigate your Cloudflare account through natural language: zones, DNS, WAF and firewall rules, rate limits, HTTP request logs, Security Center insights, and threat intelligence. The server is read-focused and geared toward security triage and investigation workflows.

Quick start

Requires a Cloudflare API token and Go 1.25+.

Add it to Claude Code with a single command:

Terminal
claude mcp add cloudflare \
  -e CLOUDFLARE_API_TOKEN=your-api-token \
  -- go run github.com/M-Yamashita01/cloudflare-mcp-go@latest

That is all — no manual clone or build required. CLOUDFLARE_ACCOUNT_ID is optional and only needed by a few tools (accounts, audit logs, KV, intel).

Tools

117 read-only tools grouped by domain, plus optional write tools (marked below) that are registered only when CLOUDFLARE_MCP_ENABLE_WRITE=true.

Zones & DNS

ToolDescription
list_zonesList zones in your account (ID, name, status, plan).
get_zoneGet details of a specific zone.
get_zone_settingsGet a zone's configuration settings (SSL mode, min TLS, cache level, security level).
purge_cachePurge a zone's cache: everything, or by file/tag/host/prefix (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
list_dns_recordsList DNS records for a zone (type, name, content, TTL, proxy status).
get_dns_recordGet a single DNS record by ID (type, name, content, TTL, proxy status, comment).
get_dns_analyticsDNS query analytics: query counts, response codes, query type distribution.
get_dns_analytics_bytimeDNS query analytics grouped by time interval (time-series).
export_dns_recordsExport all DNS records for a zone as a BIND zone file.
get_dns_record_usageDNS record usage counts for a zone (toward plan limits).
get_dns_settingsGet a zone's DNS settings (Foundation DNS, multi-provider, nameservers, zone mode).
get_dnssecGet DNSSEC details for a zone (status, DS record, digest, key tag, algorithm).
list_dnssec_zskList DNSSEC Zone Signing Keys (ZSKs) for a zone (multi-signer DNSSEC).
list_scanned_dns_recordsList DNS records discovered by a scan, pending review.
create_dns_recordCreate a DNS record (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
update_dns_recordUpdate a DNS record, partial fields (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
delete_dns_recordDelete a DNS record by ID (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
overwrite_dns_recordOverwrite (fully replace) a DNS record by ID (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
batch_dns_recordsApply a batch of DNS record changes atomically (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
import_dns_recordsImport DNS records from a BIND zone file (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
scan_dns_recordsScan a zone for DNS records at common names (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
trigger_dns_record_scanTrigger an async DNS record scan (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
review_scanned_dns_recordsAccept/reject DNS records found by a scan (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
update_dns_settingsUpdate a zone's DNS settings (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
edit_dnssecEdit a zone's DNSSEC status (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
delete_dnssecDelete a zone's DNSSEC records (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).

Firewall, WAF & rate limiting

ToolDescription
list_ip_access_rulesIP access rules that block, challenge, or allow IPs, CIDRs, ASNs, or countries.
create_ip_access_ruleCreate an IP access rule (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
update_ip_access_ruleUpdate an IP access rule's mode/notes (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
delete_ip_access_ruleDelete an IP access rule by ID (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
list_waf_managed_rulesetsWAF managed rulesets entrypoint and which managed rulesets are enabled.
list_firewall_rulesCustom firewall rules with expressions, actions, and priorities.
get_firewall_ruleFull configuration of a specific firewall rule by ID.
list_rulesetsAll rulesets for a zone (metadata only).
get_rulesetA specific ruleset with all its rules.
create_rulesetCreate a ruleset (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
update_rulesetUpdate a ruleset's name/description/rules (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
delete_rulesetDelete a ruleset by ID (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
list_rate_limitsRate limiting rules: thresholds, match criteria, actions.
get_rate_limitFull configuration of a specific rate limiting rule by ID.
create_rate_limitCreate a rate limit rule (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
update_rate_limitUpdate a rate limit rule (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).
delete_rate_limitDelete a rate limit rule by ID (write; requires CLOUDFLARE_MCP_ENABLE_WRITE=true).

Security events & logs

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cloudflare MCP Go

M-Yamashita01/cloudflare-mcp-go is an MCP server that connects MCP-compatible clients to Cloudflare API v4 for read-focused inspection and investigation. It covers zones, DNS, WAF and firewall rules, rate limits, HTTP request logs, Security Center insights, and threat intelligence such as IP, domain, ASN, WHOIS, and passive DNS data.

Install it with Go by running `go run github.com/M-Yamashita01/cloudflare-mcp-go@latest`. The server requires Go 1.25 or newer and can be added to Claude Code with `claude mcp add cloudflare -e CLOUDFLARE_API_TOKEN=your-api-token -- go run github.com/M-Yamashita01/cloudflare-mcp-go@latest`.

It can inspect Cloudflare zones, DNS records and analytics, WAF and firewall rules, rate limits, HTTP request logs, Security Center insights, and threat intelligence covering IP addresses, domains, ASNs, WHOIS, and passive DNS.

It requires a Cloudflare API token provided through `CLOUDFLARE_API_TOKEN`. `CLOUDFLARE_ACCOUNT_ID` is optional and is needed only by some tools, including accounts, audit logs, KV, and threat intelligence.

The server is currently described as read-only and read-focused.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCloudflare MCP Go AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/m-yamashita01-cloudflare-mcp-go?style=directory)](https://allmcps.com/mcp/m-yamashita01-cloudflare-mcp-go)
HTML Embed
<a href="https://allmcps.com/mcp/m-yamashita01-cloudflare-mcp-go"><img src="https://allmcps.com/api/badge/m-yamashita01-cloudflare-mcp-go?style=directory" alt="Cloudflare MCP Go on AllMCPs" /></a>