The Firefox MCP Server provides comprehensive browser automation for AI assistants with multi-session management, advanced debugging, and web interaction capabilities.
Browser & Session Management: Launch Firefox with headless mode and debug logging options, create multiple isolated tabs/sessions with independent state (cookies, storage, debugging contexts), list active tabs, close specific tabs or entire browser, and set active tabs.
Navigation & Interaction: Navigate to URLs, control browser history (back/forward/reload), click elements by selector or coordinates, type text into fields, send keyboard events with modifiers and repeats, perform drag-and-drop with smooth animations, and wait for elements with configurable timeouts.
Content & Execution: Execute custom JavaScript in browser contexts, extract HTML content from pages or elements, retrieve visible text, and take screenshots with full-page capture and custom paths.
Comprehensive Debugging:
Console Monitoring: Capture and filter logs (log, error, warn, info, debug) by type and time
Error Tracking: Capture JavaScript exceptions with stack traces
Network Analysis: Monitor HTTP requests/responses with timing data, filter by type (XHR, WebSocket, fetch)
WebSocket Traffic: Capture real-time bidirectional messages
Performance Metrics: DOM timing, paint events, and memory usage
Unified Debug Feed: Combined view of all debugging events
Control Tools: Start/stop monitoring with selective event types, clear debug buffers, inject debugging helper functions
Ideal for: Multi-user application testing, multiplayer game development, Phoenix LiveView debugging, automated UI testing with visual verification, real-time WebSocket analysis, and performance optimization.
Provides Firefox browser automation capabilities through Playwright, allowing control of Firefox for web testing. Features include browser navigation, element interaction, multi-tab session support, and advanced debugging features like console log monitoring, JavaScript error tracking, and WebSocket traffic monitoring.
Enables execution of JavaScript code in browser contexts, monitoring of JavaScript errors and console logs, and tracking of unhandled errors and promise rejections with full stack traces.
Server runs on Node.js and supports interaction with Node.js applications through browser automation, providing capabilities for testing and debugging Node.js web applications.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Firefox MCP Serverdebug the WebSocket messages on my multiplayer game page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Firefox MCP Server
Advanced Firefox browser automation with comprehensive debugging capabilities
A powerful Model Context Protocol (MCP) server that provides sophisticated Firefox browser automation through 28 specialized tools. Designed for AI assistants and automation workflows requiring multi-session management, real-time debugging, and comprehensive web interaction capabilities.
š Key Features
Multi-Session Architecture
Isolated Browser Sessions: Each session runs in a completely separate context with independent cookies, storage, and debugging
Perfect for Multiplayer Testing: Test multiplayer games and multi-user applications seamlessly
Concurrent Operations: Manage multiple browser sessions simultaneously from a single interface
Comprehensive Debugging Suite
Real-time Console Monitoring: Capture all console output (log, error, warn, info, debug)
JavaScript Error Tracking: Monitor unhandled errors with full stack traces
Network Activity Monitoring: Track HTTP requests, responses, and timing data
WebSocket Traffic Capture: Perfect for Phoenix LiveView and real-time application debugging
Performance Metrics: Monitor DOM timing, paint events, and memory usage
Advanced Interaction Capabilities
Precise Element Interaction: Click, type, and interact with any web element
Keyboard Event Simulation: Send complex key combinations and shortcuts
Drag & Drop Operations: Smooth drag operations with customizable timing and steps
JavaScript Execution: Run custom JavaScript in browser contexts
Related MCP server: Playwright MCP
š Quick Start
Installation
Basic Usage
Add to your MCP client configuration:
Example: Multi-User Testing
š ļø Complete Tool Reference
Browser Management
browser_launch- Launch Firefox with debugging capabilitiesbrowser_close- Close browser and clean up all resources
Session Management
session_create- Create isolated browser session with independent statesession_list- List all active sessions with URLs and statussession_close- Close specific session and free resourcessession_set_active- Set default session for subsequent operations
Page Navigation
page_navigate- Navigate to any URLpage_reload- Refresh current pagehistory_back/history_forward- Browser history navigationurl_get_current- Get current page URL
Element Interaction
element_click- Click elements by selector or coordinateselement_drag- Drag and drop with smooth animationsinput_type- Type text into input fields and text areaskeyboard_press- Send keyboard events with modifier supportelement_wait- Wait for elements to appear or become visible
Content Extraction
html_extract- Extract HTML content from page or elementstext_extract- Get visible text contentpage_screenshot- Capture screenshots with flexible options
Advanced Capabilities
javascript_execute- Run custom JavaScript in browser context
Comprehensive Debugging Tools
debug_console_logs- Monitor browser console outputdebug_javascript_errors- Track JavaScript errors and exceptionsdebug_network_activity- Monitor HTTP requests and responsesdebug_websocket_messages- Capture WebSocket traffic (LiveView-friendly)debug_performance_metrics- Get timing and memory usage datadebug_activity_all- Combined feed of all debugging informationdebug_monitoring_start- Start comprehensive monitoringdebug_buffers_clear- Clear accumulated debug datadebug_helpers_inject- Inject custom debugging utilities
šÆ Use Cases
Web Application Testing
Automated UI testing with visual verification
Form submission and validation testing
Cross-browser compatibility verification
Performance monitoring and optimization
Multiplayer Game Development
Multi-player session simulation
Real-time state synchronization testing
WebSocket message flow debugging
Client-side prediction validation
Phoenix LiveView Development
LiveView event flow monitoring
Real-time update verification
WebSocket connection debugging
Multi-user interaction testing
E-commerce and SaaS Testing
Multi-user checkout flows
Session isolation for different user roles
Real-time inventory updates
Payment flow testing
š Debugging Capabilities
Console Monitoring
Network Analysis
WebSocket Debugging
Performance Monitoring
āļø Troubleshooting
Playwright Browser Not Found Error
If you encounter an error like:
Solution: The Playwright browsers need to be installed. Run:
This downloads the Firefox browser binary that Playwright uses for automation. This issue was resolved on 2025-08-03 when the MCP server failed to launch due to missing browser binaries.
š§ Claude Code Configuration
Local Configuration
Claude Code uses a project-specific configuration located at:
This configuration includes:
Enabled MCP Servers: The
firefox-controlserver is enabled inenabledMcpjsonServersPermissions: Various tool permissions are whitelisted including all Firefox MCP tools
MCP Server Configuration
The Firefox MCP server is configured in Claude Code using:
The server runs from /home/luke/workbench/firefox-mcp-server/ using the main index.js file (which internally uses the index-multi-debug.js implementation).
š§ Configuration Options
Session Creation
Screenshot Options
Drag Operations
š Project Structure
š¤ Contributing
We welcome contributions! This project is designed to be:
LLM-Friendly: Tool names and descriptions optimized for AI assistant discovery
Extensible: Easy to add new browser automation capabilities
Well-Documented: Comprehensive examples and documentation
š Requirements
Node.js: 18.0.0 or higher
Firefox: Automatically installed via Playwright
MCP Client: Claude Code, Cline, or other MCP-compatible tools
š Security
This server provides comprehensive browser automation capabilities. Use with trusted MCP clients only. The server can:
Execute arbitrary JavaScript in browser contexts
Monitor all network traffic and WebSocket messages
Access page content and user interactions
Take screenshots and access media devices
š License
MIT License - see LICENSE file for details.
Perfect for AI assistants working with web applications, multiplayer games, and real-time debugging scenarios.