Model Context Protocol server for automating Firefox via WebDriver BiDi (through Selenium WebDriver). Works with Claude Code, Claude Desktop, Cursor, Cline and other MCP clients. Repository: https://github.com/freema/firefox-devtools-mcp - Node.js ≥ 20.19.0 - Firefox 100+ installed (auto‑detected, or pass --firefox-path) Recommended: use npx so you always run the latest published version from npm.
Add this skill
npx mdskills install freema/firefox-devtools-mcpWell-documented browser automation with comprehensive tool coverage and multiple setup options
1# Firefox DevTools MCP23[](https://www.npmjs.com/package/firefox-devtools-mcp)4[](https://github.com/freema/firefox-devtools-mcp/actions/workflows/ci.yml)5[](https://codecov.io/gh/freema/firefox-devtools-mcp)6[](https://opensource.org/licenses/MIT)78<a href="https://glama.ai/mcp/servers/@freema/firefox-devtools-mcp"><img src="https://glama.ai/mcp/servers/@freema/firefox-devtools-mcp/badge" height="223" alt="Glama"></a>910Model Context Protocol server for automating Firefox via WebDriver BiDi (through Selenium WebDriver). Works with Claude Code, Claude Desktop, Cursor, Cline and other MCP clients.1112Repository: https://github.com/freema/firefox-devtools-mcp1314> **Note**: This MCP server requires a local Firefox browser installation and cannot run on cloud hosting services like glama.ai. Use `npx firefox-devtools-mcp@latest` to run locally, or use Docker with the provided Dockerfile.1516## Requirements1718- Node.js ≥ 20.19.019- Firefox 100+ installed (auto‑detected, or pass `--firefox-path`)2021## Install and use with Claude Code (npx)2223Recommended: use npx so you always run the latest published version from npm.2425Option A — Claude Code CLI2627```bash28claude mcp add firefox-devtools npx firefox-devtools-mcp@latest29```3031Pass options either as args or env vars. Examples:3233```bash34# Headless + viewport via args35claude mcp add firefox-devtools npx firefox-devtools-mcp@latest -- --headless --viewport 1280x7203637# Or via environment variables38claude mcp add firefox-devtools npx firefox-devtools-mcp@latest \39 --env START_URL=https://example.com \40 --env FIREFOX_HEADLESS=true41```4243Option B — Edit Claude Code settings JSON4445Add to your Claude Code config file:46- macOS: `~/Library/Application Support/Claude/Code/mcp_settings.json`47- Linux: `~/.config/claude/code/mcp_settings.json`48- Windows: `%APPDATA%\Claude\Code\mcp_settings.json`4950```json51{52 "mcpServers": {53 "firefox-devtools": {54 "command": "npx",55 "args": ["-y", "firefox-devtools-mcp@latest", "--headless", "--viewport", "1280x720"],56 "env": {57 "START_URL": "about:home"58 }59 }60 }61}62```6364Option C — Helper script (local dev build)6566```bash67npm run setup68# Choose Claude Code; the script saves JSON to the right path69```7071## Try it with MCP Inspector7273```bash74npx @modelcontextprotocol/inspector npx firefox-devtools-mcp@latest --start-url https://example.com --headless75```7677Then call tools like:78- `list_pages`, `select_page`, `navigate_page`79- `take_snapshot` then `click_by_uid` / `fill_by_uid`80- `list_network_requests` (always‑on capture), `get_network_request`81- `screenshot_page`, `list_console_messages`8283## CLI options8485You can pass flags or environment variables (names on the right):8687- `--firefox-path` — absolute path to Firefox binary88- `--headless` — run without UI (`FIREFOX_HEADLESS=true`)89- `--viewport 1280x720` — initial window size90- `--profile-path` — use a specific Firefox profile91- `--firefox-arg` — extra Firefox arguments (repeatable)92- `--start-url` — open this URL on start (`START_URL`)93- `--accept-insecure-certs` — ignore TLS errors (`ACCEPT_INSECURE_CERTS=true`)9495## Tool overview9697- Pages: list/new/navigate/select/close98- Snapshot/UID: take/resolve/clear99- Input: click/hover/fill/drag/upload/form fill100- Network: list/get (ID‑first, filters, always‑on capture)101- Console: list/clear102- Screenshot: page/by uid (with optional `saveTo` for CLI environments)103- Utilities: accept/dismiss dialog, history back/forward, set viewport104105### Screenshot optimization for Claude Code106107When using screenshots in Claude Code CLI, the base64 image data can consume significant context.108Use the `saveTo` parameter to save screenshots to disk instead:109110```111screenshot_page({ saveTo: "/tmp/page.png" })112screenshot_by_uid({ uid: "abc123", saveTo: "/tmp/element.png" })113```114115The file can then be viewed with Claude Code's `Read` tool without impacting context size.116117## Local development118119```bash120npm install121npm run build122123# Run with Inspector against local build124npx @modelcontextprotocol/inspector node dist/index.js --headless --viewport 1280x720125126# Or run in dev with hot reload127npm run inspector:dev128```129130## Troubleshooting131132- Firefox not found: pass `--firefox-path "/Applications/Firefox.app/Contents/MacOS/firefox"` (macOS) or the correct path on your OS.133- First run is slow: Selenium sets up the BiDi session; subsequent runs are faster.134- Stale UIDs after navigation: take a fresh snapshot (`take_snapshot`) before using UID tools.135136## Versioning137138- Pre‑1.0 API: versions start at `0.x`. Use `@latest` with npx for the newest release.139140## CI and Release141142- GitHub Actions for CI, Release, and npm publish are included. See docs/ci-and-release.md for details and required secrets.143144## Author145146Created by [Tomáš Grasl](https://www.tomasgrasl.cz/)147
Full transparency — inspect the skill content before installing.