Metadata-Version: 2.4
Name: cf-mcp
Version: 0.1.1
Summary: Cloudflare CLI + MCP server for DNS, tunnels, workers, and token management.
Project-URL: Homepage, https://github.com/chikingsley/cf-mcp
Project-URL: Repository, https://github.com/chikingsley/cf-mcp
Project-URL: Issues, https://github.com/chikingsley/cf-mcp/issues
License-Expression: MIT
License-File: LICENSE
Keywords: cli,cloudflare,dns,mcp,tunnel,workers
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Networking
Requires-Python: >=3.11
Requires-Dist: fastmcp>=2.0.0
Requires-Dist: httpx>=0.28.0
Requires-Dist: pydantic-settings>=2.7.0
Requires-Dist: typer>=0.15.0
Description-Content-Type: text/markdown

# cf-mcp

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

## Install

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

## Setup

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

```bash
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](https://dash.cloudflare.com/profile/api-tokens) with permissions for the resources you want to manage.

## CLI Usage

```bash
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):

```bash
cf mcp
```

Register with Claude Code:

```bash
claude mcp add cf-mcp -- cf mcp
```

## Development

```bash
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
