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.
Metadata
Release files for clawdflare 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| clawdflare-0.1.0.tar.gz | 21.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clawdflare-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.0 kB
Release files / clawdflare-0.1.0.tar.gz
| Download URL | clawdflare-0.1.0.tar.gz |
|---|---|
| Size | 21.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2012648cd4ae4563f5158cb1811f482c8b4149a3bcfd554f8867e9acf5710cd3
|
|
BLAKE2b-256 checksum How to use checksums |
5e62b3ed0df6ec61635a2c5ae3c996909386be14b7a302b1de11a166de18247d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.
Transparency logRelease files / clawdflare-0.1.0-py3-none-any.whl
| Download URL | clawdflare-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6db549adab287710bc4a90ec23d2f89a6eecc13c2e168f42c55e29e6d69df7cd
|
|
BLAKE2b-256 checksum How to use checksums |
644cfa1b561d2edfa34fcbba2fa92584dd2b7c92290626d0e911debcbfb8482a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.
Transparency logSecurity for clawdflare 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for clawdflare-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.