firefox-devtools
Model Context Protocol server for Firefox DevTools - enables AI assistants to inspect and control Firefox browser through the Remote Debugging Protocol
claude mcp add --transport stdio freema-firefox-devtools-mcp npx -y firefox-devtools-mcp@latest \ --env START_URL="https://example.com" \ --env FIREFOX_HEADLESS="true"
How to use
This MCP server provides automation capabilities for Firefox DevTools via WebDriver BiDi (through Selenium WebDriver). It exposes a set of tools to enumerate and control browser pages, interact with UI elements, capture snapshots, inspect network activity, and read console messages. You can connect to the server with MCP clients such as Claude Code, Cursor, or the MCP Inspector, and then call tools like list_pages, navigate_page, take_snapshot, click_by_uid, fill_by_uid, list_network_requests, get_network_request, screenshot_page, and list_console_messages. The integration is designed to work with a local Firefox installation and supports headless mode for automated testing and scripting.
To use the server, run it via npx as recommended, then connect your MCP client and start issuing tool commands. For debugging or local development, you can leverage the MCP Inspector to explore the available tools and their inputs/outputs before integrating into your workflow. The CLI-friendly tooling mirrors common browser automation patterns (open page, interact with elements, capture state) and includes utilities for dialog handling, viewport management, and navigation history.
How to install
Prerequisites
- Node.js ≥ 20.19.0
- npm (bundled with Node.js)
- A local Firefox browser installation (required by the server)
Installation and setup
- Install or upgrade Node.js to meet the minimum requirement.
- Install the MCP server via npx (no global install needed):
npx firefox-devtools-mcp@latest
- (Optional) Build locally if you are developing the server:
git clone https://github.com/freema/firefox-devtools-mcp.git
cd firefox-devtools-mcp
npm install
npm run build
- Run the server directly with npx (recommended for latest):
npx firefox-devtools-mcp@latest
- Run the server with Docker (if you prefer containerized execution):
# Build the image from the repository's Dockerfile (if provided)
# or pull a prebuilt image if available
docker build -t firefox-devtools-mcp:latest .
# Run the container (adjust paths/ports as needed)
docker run -i firefox-devtools-mcp:latest
- Verify installation by connecting a MCP client (e.g., MCP Inspector) to the running server and listing available tools.
Additional notes
Tips and common issues:
- Ensure you have a local Firefox installation accessible to the server. Firefox must be installed and detectable by the system or passed via --firefox-path.
- When running in headless mode, use FIREFOX_HEADLESS=true and optionally set START_URL to your desired starting page.
- If you encounter Windows-related MCP discovery errors, consider using cmd /c prefixed commands or providing the absolute path to npx as described in the README of the project.
- For large screenshots or data, consider using the saveTo option (in MCP Inspector or scripts) to write outputs to disk and reduce context size.
- The server supports always-on network capture via list_network_requests to help debug API interactions.
- If you experience stale UIDs after navigation, perform a fresh take_snapshot before continuing to rely on page UIDs.
- When integrating into Claude Code or similar environments, prefer the npx approach to stay up-to-date with the latest release.
Related MCP Servers
gemini
MCP Server that enables Claude code to interact with Gemini
systemprompt-code-orchestrator
MCP server for orchestrating AI coding agents (Claude Code CLI & Gemini CLI). Features task management, process execution, Git integration, and dynamic resource discovery. Full TypeScript implementation with Docker support and Cloudflare Tunnel integration.
iron-manus
Iron Manus MCP
pubnub
PubNub MCP Model Context Protocol Server for use in Cursor, Windsurf, Claude Desktop, Claude Code and OpenAI Codex and more!
mcp-install-instructions-generator
Generate MCP Server Installation Instructions for Cursor, Visual Studio Code, Claude Code, Claude Desktop, Windsurf, ChatGPT, Gemini CLI and more
devserver
A specialized MCP server for monitoring development server output with intelligent error categorization and Claude Code integration