Firefox DevTools
Firefox browser automation via WebDriver BiDi for testing, scraping, and browser control. Supports snapshot/UID-based interactions, network monitoring, console capture, and screenshots.
What is Firefox DevTools?
Firefox DevTools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to firefox browser automation via webdriver bidi for testing, scraping, and browser control. supports snapshot/uid-based interactions, network monitoring, console capture, and screenshots.
Firefox browser automation via WebDriver BiDi for testing, scraping, and browser control. Supports snapshot/UID-based interactions, network monitoring, console capture, and screenshots.
This server falls under the Browser Automation category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Firefox browser automation via WebDriver BiDi for testing, s
Use Cases
Maintainer
Works with
Installation
NPM
npx -y firefox-devtools-mcpManual Installation
npx -y firefox-devtools-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Firefox DevTools
The Firefox DevTools MCP server, maintained by Mozilla, connects AI agents to a Firefox browser instance via the WebDriver BiDi protocol, enabling programmatic control of web pages for testing, scraping, and browser automation. It exposes tools for navigating pages, clicking and filling form elements, capturing screenshots, monitoring network requests, reading console logs, evaluating JavaScript, installing WebExtensions, and managing multiple browser tabs. Unlike screenshot-only browser tools, it provides structured DOM interaction through snapshot and UID-based element targeting, making it well-suited for Claude Code-driven end-to-end testing and intelligent web workflows.
Prerequisites
- Node.js 20.19.0 or later installed
- Firefox 100 or later installed on the system
- An MCP-compatible client such as Claude Code or Claude Desktop
- A dedicated Firefox profile for automation (avoid using your regular browser profile)
Add the server to Claude Code
Use the Claude Code CLI to register the Firefox DevTools MCP server. This downloads and runs the package via npx automatically.
claude mcp add firefox-devtools npx @mozilla/firefox-devtools-mcp@latestAdd with headless mode and a custom viewport (optional)
For CI or testing environments where no display is available, add the `--headless` flag and set a specific viewport size.
claude mcp add firefox-devtools npx @mozilla/firefox-devtools-mcp@latest -- --headless --viewport 1280x720Configure manually in your MCP client config file
For Claude Desktop or other clients that use a JSON config file, add the server entry manually under `mcpServers`. Key environment variables include `FIREFOX_HEADLESS`, `START_URL`, and `ENABLE_SCRIPT`.
Connect to an existing Firefox instance (optional)
If you want to attach to an already-running Firefox (preserving your session cookies and logins), start Firefox with remote debugging enabled and set the `CONNECT_EXISTING` option.
# Launch Firefox with remote debugging
firefox --remote-debugging-port 2828
# Then set in your MCP config:
# CONNECT_EXISTING=true
# MARIONETTE_PORT=2828Test with the MCP Inspector
Verify the server is working by running it through the MCP Inspector, which will open Firefox and let you call tools interactively.
npx @modelcontextprotocol/inspector npx @mozilla/firefox-devtools-mcp@latest --start-url https://example.comFirefox DevTools Examples
Client configuration
Claude Desktop config block that launches the Firefox DevTools MCP server via npx in headless mode.
{
"mcpServers": {
"firefox-devtools": {
"command": "npx",
"args": ["-y", "firefox-devtools-mcp", "--headless", "--viewport", "1280x720"],
"env": {
"ENABLE_SCRIPT": "true"
}
}
}
}Prompts to try
Example browser automation and testing tasks for the Firefox DevTools MCP server.
- "Navigate to https://example.com and take a screenshot of the full page"
- "Fill in the login form at https://app.example.com with username '[email protected]' and click Submit"
- "List all network requests made when loading https://example.com and show which ones are slowest"
- "Open a new tab, go to https://news.ycombinator.com, and extract the titles of the top 10 stories"
- "Run this JavaScript on the current page and return the result: document.title"Troubleshooting Firefox DevTools
Server starts but Firefox fails to launch
Verify Firefox 100+ is installed and the `firefox` binary is on your PATH. If Firefox is installed in a non-standard location, pass the path explicitly with the `--firefox-path` CLI flag. On Linux, ensure a display is available or use `--headless` mode.
Node.js version error on startup
The server requires Node.js 20.19.0 or later. Run `node --version` to check your version and upgrade if needed via nvm (`nvm install 20`) or your system package manager.
Browser automation breaks or behaves unexpectedly
Never run the server against your regular Firefox profile — use a dedicated profile or let the server create a temporary one. If you need to preserve login sessions, use `CONNECT_EXISTING=true` to attach to a separately launched Firefox instance rather than having the server manage the profile.
Frequently Asked Questions about Firefox DevTools
What is Firefox DevTools?
Firefox DevTools is a Model Context Protocol (MCP) server that firefox browser automation via webdriver bidi for testing, scraping, and browser control. supports snapshot/uid-based interactions, network monitoring, console capture, and screenshots. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Firefox DevTools?
Install via npm with the command: npx -y firefox-devtools-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Firefox DevTools?
Firefox DevTools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Firefox DevTools free to use?
Yes, Firefox DevTools is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Firefox DevTools Alternatives — Similar Browser Automation Servers
Looking for alternatives to Firefox DevTools? Here are other popular browser automation servers you can use with Claude, Cursor, and VS Code.
Chrome DevTools MCP
★ 40.6kAI-powered Chrome automation server with natural language element detection. Control Chrome browser through MCP protocol for testing, debugging, and performance analysis. Features 91% accuracy in element location, works with free AI models, and suppo
UI TARS Desktop
★ 34.9k📇 🏠 - Browser automation capabilities using Puppeteer, both support local and remote browser connection.
Playwright
★ 32.8kA production-ready browser automation server that enables AI assistants to interact with web pages using tools for navigation, element interaction, and data extraction. It features a built-in Inspector UI and robust crash recovery for reliable automa
Page Agent
★ 18.0kJavaScript in-page GUI agent. Control web interfaces with natural language.
Chrome
★ 11.7kAn extension-based MCP server that enables AI assistants to control your browser, leveraging existing sessions and login states for automation and content analysis. It provides over 20 tools for semantic tab search, interactive element manipulation,
LAMDA
★ 7.8kThe most powerful Android RPA agent framework, next generation mobile automation.
Browse More Browser Automation MCP Servers
Explore all browser automation servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Firefox DevTools in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Firefox DevTools?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.