firefox-mcp-server CLAUDE.md

firefox-mcp-server CLAUDE.md is an instructions file for coding agents from JediLuke/firefox-mcp-server. It costs 1,553 tokens per session, scanned A, original, MIT.

Project instructions for a Firefox browser-control server that uses Playwright, a tool for automating browsers. It covers running the server, testing it, examples, and its browser debugging tools.

In plain words
What is it for?
Use it to start or debug the server, run its tests and examples, automate Firefox sessions, and inspect console, network, WebSocket, or performance activity.
Why use it?
It gives an agent the repository-specific commands and implementation details needed to work on or use the server correctly.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/jediluke/firefox-mcp-server/claude-md
Clone the repo
git clone --depth 1 https://github.com/JediLuke/firefox-mcp-server

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for firefox-mcp-server CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jediluke/firefox-mcp-server/claude-md.svg)](https://agentmods.dev/instructions/jediluke/firefox-mcp-server/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jediluke/firefox-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/jediluke/firefox-mcp-server/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,553 This file is loaded in full into every session.
When invoked 1,553 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01553 $0.01553
Opus 5 $0.00776 $0.00776
Sonnet 5 $0.00311 $0.00311
Haiku 4.5 $0.00155 $0.00155

Measured 4d ago against content hash 60f5b55ed87a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

firefox-mcp-server CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Development Commands

Running the Server

  • npm start - Run the MCP server
  • npm run dev - Run server with Node.js debugger

Testing

  • npm test - Run basic Firefox functionality test
  • npm run install-firefox - Install Firefox browser for Playwright

Example Scripts

  • npm run example:basic - Run basic demo script
  • npm run example:multiplayer - Run multiplayer testing demo

Active Implementation

The MCP server implementation is in index.js.

The server provides:

  • Class: FirefoxMCPServer (version 1.0.0)
  • 29 MCP tools for browser automation and debugging
  • Multi-session support with complete isolation
  • Advanced debugging capabilities (console logs, WebSocket monitoring, network activity, performance metrics)

Architecture Overview

Core Components

  1. MCP Server: Uses @modelcontextprotocol/sdk for stdio communication
  2. Browser Engine: Playwright Firefox automation
  3. Session Management: Map-based storage for browser contexts and pages
  4. Debug Buffers: Per-tab in-memory storage for monitoring data

Key Data Structures

  • this.browser - Main Firefox browser instance
  • this.contexts - Map of contextId → BrowserContext (for session isolation)
  • this.pages - Map of tabId → Page (for tab management)
  • this.consoleLogs - Map of tabId → array of console log events
  • this.jsErrors - Map of tabId → array of JavaScript error events
  • this.networkActivity - Map of tabId → array of network events
  • this.wsMessages - Map of tabId → array of WebSocket messages
  • this.performanceMetrics - Map of tabId → performance data
  • this.activeTabId - Currently active tab identifier

Session Isolation Architecture

Each session gets its own browser context with:

  • Separate cookies and storage
  • Independent session data
  • Isolated network monitoring
  • Individual debug buffers

Tool Categories

Read the full file on GitHub · 189 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 189 lines · 1,553 tokens per session scan A 60f5b55ed87a

Subscribe to this mod's changes

firefox-mcp-server CLAUDE.md is an instructions file published in the GitHub repository JediLuke/firefox-mcp-server (30 stars, last pushed 8mo ago), licensed MIT. It adds 1,553 tokens to every session, about $0.0078 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories