firefox-devtools-mcp  by mozilla

AI assistant for Firefox browser automation and inspection

Created 10 months ago
310 stars

Top 86.7% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides a Model Context Protocol (MCP) server for Firefox DevTools, enabling AI assistants to inspect and control the Firefox browser. It targets developers and researchers integrating AI capabilities into browser automation workflows, offering a bridge between AI agents and the web.

How It Works

The MCP server acts as an intermediary, leveraging WebDriver BiDi via Selenium WebDriver to translate AI commands into browser actions. This approach allows AI models to programmatically navigate, interact with, and gather information from web pages, facilitating complex automated tasks and analysis.

Quick Start & Requirements

  • Installation: Recommended installation via npx @mozilla/firefox-devtools-mcp@latest for the latest version. Docker is also supported.
  • Prerequisites: Node.js (≥ 20.19.0) and a local Firefox installation (≥ 100).
  • Configuration: Options include CLI arguments, environment variables, or editing Claude Code settings JSON.
  • Resources: Official repository: https://github.com/mozilla/firefox-devtools-mcp.

Highlighted Details

  • Supports integration with AI clients like Claude Code, Cursor, and Cline.
  • Offers extensive CLI options for headless operation, viewport control, specific Firefox profiles, and advanced features like script execution (--enable-script) and privileged context access (--enable-privileged-context).
  • Includes robust tooling for page manipulation, network inspection, console message retrieval, screenshots, and script evaluation.
  • Supports automation on Firefox for Android via ADB.

Maintenance & Community

  • Maintainer: Maintained by Mozilla.
  • Development: Contribution guidelines are available in CONTRIBUTING.md.

Licensing & Compatibility

  • License: Licensed under either MIT or Apache 2.0, offering flexibility for commercial use.
  • Compatibility: Permissive licensing, but users must be aware of security implications, especially when enabling advanced agent capabilities.

Limitations & Caveats

  • Security: Inherent risks exist; users must employ dedicated Firefox profiles, avoid untrusted sites, and understand prompt injection vulnerabilities.
  • Execution Environment: Requires a local Firefox installation and cannot be run on cloud hosting services.
  • --connect-existing Mode: BiDi-dependent features are unavailable, and enabling Marionette can trigger bot detection.
  • Feature Dependencies: Advanced features like script execution require specific Firefox versions (153+ for debugging tools) and potentially elevated system access (MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1).
Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

obscura by h4ckf0r0day

0.0%
20k
Lightweight headless browser for AI agents and web scraping
Created 4 months ago
Updated 4 days ago
Feedback? Help us improve.