JF

jediluke/firefox-mcp-server

浏览器自动化

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

29 stars 3 forks 质量 70 趋势 11MIT

一个完全编码氛围的实验性MCP服务器,用于控制Firefox

概览

强大的模型上下文协议(MCP)服务器,通过28个专用工具提供复杂的Firefox浏览器自动化。专为AI助手和需要多会话管理、实时调试和全面网页交互功能的自动化工作流设计。 - : 每个会话在完全独立的上下文中运行,拥有独立的 Cookie、存储和调试 - : 无缝测试多人游戏和多用户应用 - : 从单一界面同时管理多个浏览器会话 - : 捕获所有控制台输出(日志、错误、警告、信息、调试) - : 监控未处理错误并全栈跟踪 - : 跟踪HTTP请求、响应和时序数据 - : 非常适合Phoenix LiveView和实时应用调试 - : 监控DOM时序、绘制事件和内存使用情况 - : 点击、输入并与任何网页元素交互 - : 发送复杂的按键组合和快捷键 - : 顺畅拖曳操作,可自定义时机和步骤 - : 运行...

概述(AI 翻译)

高级Firefox浏览器自动化,具备全面调试功能

强大的模型上下文协议(MCP)服务器,通过28个专用工具提供复杂的Firefox浏览器自动化。专为AI助手和需要多会话管理、实时调试和全面网页交互功能的自动化工作流设计。

🌟 主要特色

多会话架构

  • 隔离浏览器会话:每个会话在完全独立的上下文中运行,拥有独立的Cookie、存储和调试
  • 非常适合多人测试:无缝测试多人游戏和多用户应用
  • 并发操作:从单一接口同时管理多个浏览器会话

综合调试套件

  • 实时控制台监控:捕获所有控制台输出(日志、错误、警告、信息、调试)
  • JavaScript 错误跟踪:通过全栈跟踪监控未处理错误
  • 网络活动监控:跟踪HTTP请求、响应和时序数据
  • WebSocket 流量捕获:非常适合 Phoenix LiveView 和实时应用调试

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

README

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

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

🚀 Quick Start

Installation

npm install firefox-mcp-server
npx playwright install firefox

Basic Usage

Add to your MCP client configuration:

{
  "mcpServers": {
    "firefox": {
      "command": "npx",
      "args": ["firefox-mcp-server"],
      "env": {}
    }
  }
}

Example: Multi-User Testing

// Launch browser and create isolated sessions
await browser_launch({headless: false})
await session_create({sessionId: "user1", url: "https://app.example.com"})
await session_create({sessionId: "user2", url: "https://app.example.com"})

// User 1 creates a game
await element_click({sessionId: "user1", selector: "button.create-game"})

// User 2 joins the game
await element_click({sessionId: "user2", selector: "button.join-game"})
await input_type({sessionId: "user2", selector: "input.game-code", text: "ABC123"})

// Monitor both sessions for real-time updates
await debug_websocket_messages({sessionId: "user1", limit: 10})
await debug_websocket_messages({sessionId: "user2", limit: 10})

🛠️ Complete Tool Reference

Browser Management

  • browser_launch - Launch Firefox with debugging capabilities
  • browser_close - Close browser and clean up all resources

Session Management

  • session_create - Create isolated browser session with independent state
在 GitHub 查看完整 README

安装

npx firefox-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "firefox": { "command": "npx", "args": ["firefox-mcp-server"], "env": {} } } }