MF

mozilla/firefox-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

602 stars 77 forks 质量 83 趋势 67NOASSERTION

模式上下文协议( MCP) 服务器, 让 AI 代理浏览网页, 用 Firefox 调试网页

概览

模式上下文协议服务器,允许AI代理使用Firefox. 它有两种主要用途: - :代理使用浏览器执行常规任务,例如阅读页面,填充表和通过网站的多步流. - :代理加载您正在处理的页面,并用开发工具检查,如控制台,网络请求,调试器和配置器等. 它通过WebDriver BiDi(通过Selenium WebDriver)控制Firefox,并与克洛德代码,克洛德桌面,Cursor,Cline等MCP客户端合作. 仓库: https://github.com/mozilla/firefox-mcp 也以@mozilla/firefox-devtools-mcp的形式为现有设置发布. :此MCP服务器需要本地Firefox浏览器安装,无法运行于glama.ai等云托管服务上. 使用 npx @ mozilla/ firefox- mcp@latest 本地运行, 或使用提供的 Docker 文件 。 浏览器MCP服务器带有内在风险.

概述(AI 翻译)

模式上下文协议服务器,允许AI代理使用Firefox. 它有两种主要用途:

  • 代理浏览:代理使用浏览器执行常规任务,如阅读页面,填充表和在网站上走多步流.
  • 代理辅助网络开发:代理加载您正在操作的页面并用开发工具检查,如控制台,网络请求,调试器和配置器等.

它通过WebDriver BiDi(通过Selenium WebDriver)控制Firefox,并与克洛德代码,克洛德桌面,Cursor,Cline等MCP客户端合作.

仓库: https://github.com/mozilla/firefox-mcp

还作为@mozilla/firefox-devtools-mcp的现有设置发布。

** 说明**: 这个MCP服务器需要本地Firefox浏览器安装,无法运行于glama.ai等云托管服务上. 使用 npx @mozilla/firefox-mcp@latest 本地运行, 或者使用提供的 Docker 文件 。

□ 警卫

浏览器MCP服务器带有内在风险. 少数关键做法:

  • ** 使用专用Firefox简介.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Firefox MCP

Model Context Protocol server that lets AI agents use Firefox. It has two main use cases:

  • Agentic browsing: the agent uses the browser for regular tasks, such as reading pages, filling forms and going through multi-step flows on websites.
  • Agent-assisted web development: the agent loads the page you are working on and inspects it with developer tools, such as the console, network requests, the debugger and the profiler.

It controls Firefox through WebDriver BiDi (via Selenium WebDriver) and works with Claude Code, Claude Desktop, Cursor, Cline and other MCP clients.

Repository: https://github.com/mozilla/firefox-mcp

Also published as @mozilla/firefox-devtools-mcp for existing setups.

Note: This MCP server requires a local Firefox browser installation and cannot run on cloud hosting services like glama.ai. Use npx @mozilla/firefox-mcp@latest to run locally, or use Docker with the provided Dockerfile.

Security

Browser MCP servers carry inherent risks. A few key practices:

  • Use a dedicated Firefox profile. Never run the server against your regular profile — the agent has access to whatever the browser can reach, including cookies and saved sessions.
  • Be cautious about which sites you visit. Pages can return content designed to manipulate the agent (prompt injection). Stick to sites you control or trust.
  • Enable only the tool modules you need. The default basic preset already includes evaluate_script; --tool-preset slim drops it. Higher presets such as --tool-preset developer (debugging, network, console, profiler) and --tool-preset mozilla (privileged context) expand what the agent can do further.

See SECURITY.md for a full breakdown of risks and how to report vulnerabilities.

Requirements

  • Node.js ≥ 20.19.0
  • Firefox 100+ installed (auto‑detected, or pass --firefox-path)

Install and use with Claude Code or Codex (npx)

Recommended: use npx so you run the latest published version from npm.

Option A — CLI

Claude Code

claude mcp add firefox npx @mozilla/firefox-mcp@latest

# Headless + viewport via args
claude mcp add firefox npx @mozilla/firefox-mcp@latest -- --headless --viewport 1280x720
在 GitHub 查看完整 README

安装

npx -y @mozilla/firefox-mcp@latest --headless --viewport 1280x720
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "firefox": { "command": "npx", "args": ["-y", "@mozilla/firefox-mcp@latest", "--headless", "--viewport", "1280x720"], "env": { "START_URL": "about:blank" } } } }