cf-browser-mcp
MCP server (built on the official mcp 2.x Python SDK) exposing 17 Cloudflare Browser Run tools (formerly Browser Rendering) to Claude Code and other MCP clients. Requires Python 3.10+.
Install
python -m pip install cf-browser-mcp
Configure
Set CF_BROWSER_MODE explicitly when both credential pairs might exist.
| Mode | Credentials | Tools |
|---|---|---|
direct |
CF_ACCOUNT_ID, CF_API_TOKEN |
12 read/crawl tools |
worker |
CF_BROWSER_URL, CF_BROWSER_API_KEY |
All 17 tools |
Use environment expansion so secrets do not live in a project file:
{
"mcpServers": {
"cf-browser": {
"type": "stdio",
"command": "python3",
"args": ["-m", "cf_browser_mcp.server"],
"env": {
"CF_BROWSER_MODE": "${CF_BROWSER_MODE}",
"CF_BROWSER_URL": "${CF_BROWSER_URL}",
"CF_BROWSER_API_KEY": "${CF_BROWSER_API_KEY}"
}
}
}
}
For Direct mode, replace the two Worker variables with CF_ACCOUNT_ID and CF_API_TOKEN. If both complete credential pairs exist and no mode is selected, startup fails instead of silently choosing one.
Tools
Read/crawl tools:
browser_content,browser_markdown,browser_screenshot,browser_pdfbrowser_snapshot,browser_scrape,browser_json,browser_links,browser_a11ybrowser_crawl,browser_crawl_status,browser_delete_crawl
Worker interaction tools:
browser_click,browser_type,browser_evaluatebrowser_interact,browser_submit_form
MCP input schemas accept real arrays/objects for cookies, headers, HTTP Basic authentication, actions, fields, script/style tags, and JSON response schemas. JSON-encoded strings remain accepted for compatibility. Read and interaction tools expose page controls consistently; crawls include cache_ttl, depth, formats, Content Signals purposes, freshness filters, URL patterns, JSON options, and rendered controls. Full goto_options, wait_for_selector, and viewport objects are available alongside flattened conveniences, with ambiguous combinations rejected. Static mode rejects browser-only options; crawl status accepts string or non-negative integer cursors and current record filters.
Screenshot and PDF results are written with unpredictable names into a process-private directory. Paths exclude URL credentials, files use mode 0600, quotas prevent unbounded accumulation, and the directory is removed when the MCP process exits normally (a process killed by a signal leaves its private 0700 directory in the system temp folder).
Validation, configuration and SDK errors (authentication, rate limits, transport failures) are returned to the client as tool errors with their message; unexpected internal errors are reported only as a generic tool failure.
Troubleshooting
- Interaction returns 501: enable the Worker
BROWSERbinding. - Interaction returns 404: redeploy the current Worker;
/healthshould report2.1.0. - A tool reports ambiguous or missing credentials (checked on the first tool call): set
CF_BROWSER_MODE=directorworkerand that mode's two variables. - Crawl wait returns a failed JSON status only for terminal crawl states; transport/auth errors remain typed errors instead of being mislabeled as job failures. A crawl that finished but whose results could not be fetched in time reports
status: "completed"with_timeout: true.
See the project README for setup and the complete API contract.
License
Metadata
Release files for cf-browser-mcp 2.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 | |
|---|---|---|---|---|
| cf_browser_mcp-2.1.0.tar.gz | 18.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cf_browser_mcp-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.8 kB
Release files / cf_browser_mcp-2.1.0.tar.gz
| Download URL | cf_browser_mcp-2.1.0.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4e2476a1d327076277134036433c093da8fde920aa17eb08f43df813cf515d3
|
|
BLAKE2b-256 checksum How to use checksums |
90ecc684afbebf90bd7af6242fa409f554893de888f5d4ecd27b899d1aed38e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 21, 2026.
Transparency logRelease files / cf_browser_mcp-2.1.0-py3-none-any.whl
| Download URL | cf_browser_mcp-2.1.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd0b9a573968a5562429b9875915c50816fced302b74f8457fac445d5ea11393
|
|
BLAKE2b-256 checksum How to use checksums |
c7d2a59b12d3a5735681b26487d374d981b96c5ef87709fc7f1c802ade14922b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 21, 2026.
Transparency logSecurity for cf-browser-mcp 2.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 cf_browser_mcp-2.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 Oct 21, 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.