Skip to main content

Opinionated Cloudflare MCP server — audit and fix your zones

Project description

clawdflare

Opinionated Cloudflare MCP server — audit and fix your zones.

Read operations are free. Write operations require a PIN.

The idea

AI agents are great at reading infrastructure and telling you what's wrong. They're less great at having unsupervised write access to your DNS and SSL settings. Clawdflare solves this by splitting access:

  • Read token (env var) — the AI uses this freely to audit, inspect, and report
  • Write token (encrypted on disk) — decrypted only when you enter a PIN into a macOS popup

The AI never sees the write token. It never sees the PIN. It gets back a success/failure result and that's it.

Full setup guide and security rationale →

Quick start

pip install -e ".[dev]"

# 1. Read-only token in your environment
export CLOUDFLARE_API_TOKEN="your-read-only-token"

# 2. Encrypt your write token with a PIN
clawdflare setup-token

# 3. Go
clawdflare audit example.com

Usage

CLI

clawdflare zones                    # list all zones
clawdflare audit example.com        # audit against best practices
clawdflare fix example.com          # dry-run: show what would change
clawdflare fix example.com --apply  # apply fixes (PIN required)
clawdflare ssl-status example.com   # SSL/TLS summary
clawdflare dns-records example.com  # list DNS records
clawdflare set-setting example.com ssl full  # set a setting (PIN required)
clawdflare purge-cache example.com --everything  # purge cache (PIN required)

MCP Server

clawdflare serve

Add to Claude Code settings:

{
  "mcpServers": {
    "clawdflare": {
      "command": "clawdflare",
      "args": ["serve"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-read-only-token"
      }
    }
  }
}

Opinions

Clawdflare ships with opinionated defaults for security and performance. Run clawdflare audit to see how your zone stacks up:

  • SSL: Full mode (not flexible — flexible leaves origin traffic unencrypted)
  • HTTPS: Always redirect, HSTS with 1-year max-age and subdomains
  • TLS: Minimum 1.2 (1.0/1.1 are deprecated and vulnerable), TLS 1.3 with 0-RTT
  • HTTP/3: Enabled (QUIC reduces latency, especially on mobile)
  • Cache: 4-hour browser TTL
  • Security: Email obfuscation, hotlink protection, automatic HTTPS rewrites

Every opinion includes a reason. Disagree? Override with clawdflare set-setting.

Security model

Operation Token used AI can see token? Authorization
zones, audit, dns-records, ssl-status, zone-settings Read (env var) Yes None needed
fix --apply, set-setting, purge-cache Write (encrypted vault) Never PIN via macOS popup

See SETUP.md for the full threat model and rationale.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clawdflare-0.1.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clawdflare-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file clawdflare-0.1.0.tar.gz.

File metadata

  • Download URL: clawdflare-0.1.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clawdflare-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2012648cd4ae4563f5158cb1811f482c8b4149a3bcfd554f8867e9acf5710cd3
MD5 a5e1996bc927c02e3a4b120065750f74
BLAKE2b-256 5e62b3ed0df6ec61635a2c5ae3c996909386be14b7a302b1de11a166de18247d

See more details on using hashes here.

Provenance

The following attestation bundles were made for clawdflare-0.1.0.tar.gz:

Publisher: publish.yml on eidos-agi/clawdflare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clawdflare-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: clawdflare-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clawdflare-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6db549adab287710bc4a90ec23d2f89a6eecc13c2e168f42c55e29e6d69df7cd
MD5 59abe5da93453d8b5ad064df798130b0
BLAKE2b-256 644cfa1b561d2edfa34fcbba2fa92584dd2b7c92290626d0e911debcbfb8482a

See more details on using hashes here.

Provenance

The following attestation bundles were made for clawdflare-0.1.0-py3-none-any.whl:

Publisher: publish.yml on eidos-agi/clawdflare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page