Skip to main content

cf-mcp

Cloudflare CLI + MCP server for managing DNS, tunnels, workers, and API tokens.

Install

uv tool install cf-mcp
# or run directly:
uvx cf-mcp

Setup

Set environment variables (or create a .env file):

export CF_API_TOKEN="your-cloudflare-api-token"
export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export CLOUDFLARE_TUNNEL_ID="your-default-tunnel-id"  # optional

Create a token at dash.cloudflare.com/profile/api-tokens with permissions for the resources you want to manage.

CLI Usage

cf zone list
cf dns list example.com
cf dns create example.com app CNAME target.example.com --proxy
cf dns update example.com RECORD_ID --content new-value
cf dns delete example.com RECORD_ID
cf tunnel list
cf tunnel ingress list
cf tunnel ingress add app.example.com http://localhost:3000
cf tunnel ingress remove app.example.com
cf workers list
cf workers info my-worker
cf token verify
cf token list
cf token permissions TOKEN_ID
cf token delete TOKEN_ID

All commands support --json for machine-readable output.

MCP Server

Start the MCP server (stdio transport):

cf mcp

Register with Claude Code:

claude mcp add cf-mcp -- cf mcp

Development

git clone https://github.com/chikingsley/cf-mcp.git
cd cf-mcp
uv sync
uv run pytest -v         # integration tests (requires .env)
uv run ruff check .      # lint
uv run ty check src/     # type check

License

MIT

Metadata

Release files for cf-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cf-mcp 0.1.1
File Size Uploaded Provenance
cf_mcp-0.1.1.tar.gz 108.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cf-mcp 0.1.1
File Interpreter ABI Platform
cf_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 122.3 kB

Release files / cf_mcp-0.1.1.tar.gz

Download URL cf_mcp-0.1.1.tar.gz
Size 108.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5c8596052b189dc319d4051512de50130647e4c895ddec097cbb03a044454e59
BLAKE2b-256 checksum
How to use checksums
24a2034f55759aee66597f026670c7ae8d7264d11daefd82721515fe6f8f8347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cf_mcp-0.1.1-py3-none-any.whl

Download URL cf_mcp-0.1.1-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01b298564b64d343f4dac4b3e256915a6fa6db4d6ff7273ba5b44f0a037a8375
BLAKE2b-256 checksum
How to use checksums
2c3ccd6f449bd028f2bc88dec990ddad45fa4f77e990a16ba853c28d0276850e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cf-mcp 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page