RM

robithyusuf/mcp-camoufox

Browser automation
23 stars 6 forks Quality 88 Trend 14MIT

MCP server for stealth browser automation via Camoufox — 100+ tools, npx install, anti-bot stealth

Overview

The most feature-rich stealth browser MCP server. for full browser control powered by Camoufox — a Firefox fork with C++ level anti-detection that bypasses Cloudflare, bot detection, and anti-automation. - Login to Google, ChatGPT, GitHub — without getting blocked - Fill forms, click buttons, type text, upload files - Manage cookies, localStorage, sessions across visits - Take screenshots, export PDFs, capture network traffic - Work with multiple tabs, iframes, dialogs - Execute JavaScript, inspect elements, scroll pages - Scrape structured data (job listings, products) with auto-detected selectors - All while being by anti-bot systems Competitor figures checked 19 Aug 2026: camofox-mcp counted by running tools/list against v1.15.0 from npm (it is npx-installable — an earlier version of this table wrongly said otherwise); the others are taken from their own READMEs. click_turnstile() auto-detects the widget via 6 selector fallback (iframe[src*=challenges.cloudflare.

README

Camoufox is a Firefox build that spoofs its fingerprint in C++ rather than through injected JavaScript. This server drives it with Playwright over Juggler, Firefox’s automation protocol. Requests that need no browser go through impit, which presents a Firefox TLS fingerprint.

Use the browser when a page needs JavaScript, a login or a person looking at it. Use HTTP when you only need the data.

  • ✅ Camoufox with its fingerprint spoofing, driven over Juggler instead of CDP
  • ✅ HTTP with a Firefox TLS fingerprint, reusing the browser’s cookies when you want
  • ✅ Replies that say what happened: a click reports whether the page changed, navigated or opened a tab
  • ✅ Passwords, cookies and tokens hidden from tool output by default
  • ✅ Logins kept in a persistent profile, or a temporary profile for one-off sessions
  • ✅ Search through an endpoint you control (SearXNG, Brave, Tavily, Exa), with no result-page scraping
  • ✅ Works with Claude Code, Cursor, Codex, Gemini CLI, OpenCode, Droid and other MCP clients

Install

You need Node.js 18 or newer. The Camoufox browser downloads itself the first time browser_launch is called: about 1.3 GB, usually 2 to 5 minutes, about 2.4 GB on disk (measured on macOS arm64 with Camoufox 158). The download runs in the background. browser_launch answers within a minute with how far it got and asks to be called again, and server_status shows the progress. Tools that need no browser, such as scrape_markdown and http_request, work meanwhile. A browser deleted to free disk space is downloaded again the same way.

Add the server to your client.

Claude Code

All projects:

claude mcp add camoufox --scope user -- npx -y mcp-camoufox@latest

Current project only:

claude mcp add camoufox -- npx -y mcp-camoufox@latest

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.camoufox]
command = "npx"
args = ["-y", "mcp-camoufox@latest"]

OpenCode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "camoufox": {
      "type": "local",
      "command": ["npx", "-y", "mcp-camoufox@latest"],
      "enabled": true
    }
  }
}

Other clients

Open the one you use:

On Windows the browser goes to %LOCALAPPDATA%\camoufox\camoufox\Cache and the data to %USERPROFILE%\.camoufox-mcp\. Output paths accept C:\path\file.json and C:/path/file.json.

Usage examples

An agent usually reads the page, then acts on the refs it got back:

browser_launch(url="https://example.com")
browser_snapshot()
click(ref="e3")
fill(ref="e5", value="hello")

Read a page without starting a browser. smart_fetch only uses the browser if the response looks blocked and one is running:

scrape_markdown(url="https://example.com/docs")
smart_fetch(url="https://shop.example.com/item/42")

Log in with the browser, then call the site’s API over HTTP with the same cookies:

browser_launch(url="https://app.example.com/login", headless=false)
smart_fill(fields_json='{"Email":"[email protected]","Password":"..."}', submit_label="Sign in")
wait_for_change()
http_request(url="https://app.example.com/api/orders")

Find out why a click did nothing, before spending the click:

assert_clickable(selector="#submit")
# FAIL: covered by div.overlay

Run a sequence in one call. A failed step stops it and tells you where to resume:

workflow_run(steps=[
  {tool: "navigate", args: {url: "https://example.com"}},
  {tool: "smart_fill", args: {fields_json: '{"Search":"camoufox"}'}},
  {tool: "click_text", args: {text: "Search"}},
  {tool: "wait_for_change", args: {}}
])

Search through an endpoint you control:

search(query="firefox tls fingerprint", endpoint="http://127.0.0.1:8899")

Test results

These come from the screenshots below, taken when each was captured. Sites and detectors change, so read them as what was observed and not as a guarantee. A pass on a test page does not mean a given protected site will let you in: IP reputation and session history count too.

Site What it checks Result
bot.sannysoft.com Fingerprint tests ✅ Passes, apart from the expected “Chrome missing”
browserscan.net/bot-detection WebDriver, User-Agent, CDP, Navigator ✅ All four “Normal”
2captcha.com/demo/cloudflare-turnstile Turnstile widget, with Cloudflare’s test key ✅ Widget reaches “Success!”
nopecha.com/demo/cloudflare Full-page “Just a moment…” challenge ⚠️ Playwright click rejected, 0 of 3. Real OS cursor click passed, 2 of 2, on macOS from one machine and IP

Measured against Playwright MCP

Both servers were driven as real MCP clients over stdio on one machine (Apple M4 Pro, macOS), headless, with a new server and browser per round. mcp-camoufox ran Camoufox 158.0.1-beta.41. The other server was Microsoft’s Playwright MCP 0.0.85 with its own Firefox 159. Numbers are medians of 5 rounds for speed and 3 for actions. The machine was in use while they ran, so treat small gaps as noise.

Measure mcp-camoufox Playwright MCP
Start the browser and load a first page 1.6 to 2.1 s 1.0 to 1.1 s
Navigate again to a local page 59 ms 60 ms
Navigate again to a Wikipedia article 219 ms 1,091 ms
Click that changes the page 52 ms 551 ms
Click on a disabled button refused in 431 ms timeout after 5,015 ms
Click on a covered button 2,574 ms, clicked through the fallback, blocker named timeout after 5,018 ms
Click that opens an alert() 429 ms, reported as the dialog 55 ms
Click and fill inside a cross-origin iframe 71 ms and 25 ms 561 ms and 27 ms
evaluate("1+1") 0.6 ms 508 ms
Memory with one form page open 1,324 MB 1,049 MB
Snapshot of a 158-element form 1,866 tokens 3,963 tokens
Snapshot of a long Wikipedia article 20,229 tokens, cut at 60,000 characters and says so 235,191 tokens
Tool definitions sent to the client 14,956 tokens for 135 tools 4,568 tokens (it has 25)
DOM calls a page can observe during a click 0 1
navigator.webdriver false true
browserscan.net/bot-detection Normal Robot
bot.sannysoft.com 30 of 57 rows pass, 1 fails (“Chrome missing”) 27 of 57 pass, 4 fail

Where it loses: the browser takes half a second to a second longer to start, and nearly all of that is the Camoufox binary itself. It uses more memory unless you launch with ublock=false (then about 1,040 MB). Its tool list costs a client more than three times as many tokens. A click that changes nothing waits a full second before saying so, where Playwright MCP returns after half a second without saying whether anything happened.

The two snapshots are not the same thing. mcp-camoufox lists interactive elements and headings. Playwright MCP returns the whole accessibility tree including text. Token counts use the o200k_base tokenizer as an estimate.

Cloudflare Turnstile

The widget shows “For testing only”: this demo uses Cloudflare’s test sitekey and returns a dummy token. It shows that the click lands on the widget. It does not show that a protected site lets you through.

click_turnstile reports what it observed after the click: whether a token appeared, the final title and URL, whether a challenge still shows, and whether the sitekey is a Cloudflare test key. A click that produced no token is an error. A cf_clearance cookie on its own is not proof of passing either.

A Playwright click carries mozInputSource=0 and an empty pointerType, and a real challenge can reject that. turnstile_coords followed by os_click_xy delivers a real OS cursor click instead, as two separate calls, in a headed browser. macOS is tested, with its Accessibility permission. The Windows and Linux paths are written but not tested. It moves your actual cursor and brings the window forward, so it will interrupt what you are doing on that machine.

bot.sannysoft.com

navigator.webdriver is missing and WebDriver Advanced passes. The one red row is “Chrome missing”, which is correct for a browser presenting itself as Firefox.

browserscan.net

WebDriver, User-Agent, CDP and Navigator all read “Normal”.

Tools

135 tools in 32 groups. docs/TOOLS.md lists every tool and parameter, and a test fails if that list or this page stops matching the running server.

Main features

Limits

  • save_pdf cannot work here: Playwright generates PDFs only on Chromium. Use screenshot(full_page=true).
  • Firefox has no CDP, so there are no performance traces, coverage, heap snapshots or CPU and network throttling.
  • browser_snapshot lists elements inside visible iframes (refs like f1e3, up to 8 frames and 60 elements per frame) and inside open shadow roots (up to 1,000 roots, 8 levels deep), but cannot read a closed shadow root.
  • A fingerprint that claims another operating system than the machine’s own starts about 4 seconds slower and still lists the machine’s speech voices. os="auto" is the default for that reason. This was measured on macOS only.
  • CLS is unavailable, because Firefox does not implement layout-shift.
  • Camoufox occasionally never commits a navigation. A 30-second timeout from navigate is usually this, and a retry works. tab_new retries by itself.
  • No CAPTCHA solving. Use headless=false and solve it yourself.
  • npm audit may flag adm-zip through camoufox-js. npm applies overrides only from the root project, so add "overrides": { "adm-zip": "0.6.0" } to your own package.json if your scanner requires it.

Troubleshooting

Problem What to do
“Browser not running” Call browser_launch. If the browser crashed, server_status says so under last_exit.
“The browser is running but every tab is closed” Call tab_new, or browser_launch with a URL.
“A copy of Camoufox is already open” Another browser is using the default profile. Close it, or launch with fresh_profile=true.
A click reports no page change The page may react later, so try wait_for_change. assert_clickable shows whether something covers the element.
A ref stopped working Refs belong to one snapshot. Call browser_snapshot again.
“Camoufox … is being downloaded now” The first launch, or the browser was deleted. Wait a minute and call browser_launch again. server_status shows the progress.
“Camoufox could not be downloaded” The message says why. browser_launch retries; the command it names shows the full output in a terminal.
evaluate returns undefined for a page variable You passed world="isolated", which shares only the DOM. The default world="main" reaches the page’s variables.
The first launch after an install fails with “Version information not found” You are on 0.12.0 or older, which fetched the browser with a newer camoufox-js than it could read. Upgrade.
browser_launch fails with setDefaultViewport ... isMobile You are on a version before 0.9.3. Upgrade.
A tool says it did not finish The page may be wedged. tab_new opens a fresh tab; browser_recover resets the session.
I cannot see the browser window headless=true is the default and opens none. With headless=false the window opens behind your current app so it does not take your keyboard. Switch to it from the Dock or task bar.

How it works

AI agent
   |  MCP over stdio
   v
mcp-camoufox (Node.js) ---- impit (Firefox TLS) ---> HTTP requests with no browser
   |  Playwright over Juggler
   v
Camoufox (patched Firefox)

browser_snapshot returns a short list of the elements on the page, each with a ref, so an agent can act by ref instead of reading the whole page. The refs are kept in a registry in Camoufox’s isolated JavaScript world. Nothing is written into the document, so a page’s own scripts cannot find them.

The server’s own reads (snapshot, click checks, change detection) also run in that isolated world. A test page that wraps querySelector, getBoundingClientRect and similar functions counted zero calls from a snapshot, a click, a fill and a hover. evaluate is the exception, because it runs your code: by default it runs beside the page’s scripts so it can reach their variables, and the page can observe what that code calls. Pass world="isolated" when you only need the DOM.

mcp-stealth-chrome is the sister project: the same idea for a real Chrome over CDP, in Python.

License

MIT

View the full README on GitHub

Install

npx -y mcp-camoufox@latest
New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "camoufox": { "command": "npx", "args": ["-y", "mcp-camoufox@latest"] } } }