firefox-mcp-server: Instructions file for Claude Code

CLAUDE.md

firefox-mcp-server CLAUDE.md is an instructions file for Claude Code 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is JediLuke/firefox-mcp-server's own configuration. It tells Claude Code how to work on firefox-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything firefox-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JediLuke/firefox-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JediLuke/firefox-mcp-server/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/JediLuke/firefox-mcp-server

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for firefox-mcp-server CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01553 $0.01553
Opus 5.5 $0.00621 $0.00621
Sonnet 5.5 $0.00311 $0.00311
Haiku 4.5 $0.00155 $0.00155

Measured 2mo ago against content hash 60f5b55ed87a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 10mo ago), licensed MIT. It adds 1,553 tokens to every session, about $0.0062 per session on Opus 5.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

firefox-mcp-server CLAUDE.md compared with instructions from other repositories

firefox-mcp-server CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
firefox-mcp-server CLAUDE.mdJediLuke/firefox-mcp-serverInstructions file3010mo agoMITA1,553Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot