chrome-local-mcp: Instructions file for Codex

AGENTS.md

chrome-local-mcp AGENTS.md is an instructions file for Codex, OpenCode from thronapple/chrome-local-mcp. It costs 714 tokens per session, scanned B, original, MIT.

Instructions for chrome-local-mcp, an MCP server that connects an assistant to a Windows Chrome browser through Chrome's developer connection. It supports WSL setups and keeps people involved for CAPTCHAs and verification challenges.

In plain words
What is it for?
Setting up, testing, and registering chrome-local-mcp with Codex or the Codex command line.
Why use it?
They document the required Chrome startup option, build and test commands, and registration steps needed to make the browser connection available.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads ~/.codex paths; mentions AGENTS.md; mentions Codex.

This is thronapple/chrome-local-mcp's own configuration. It tells Codex and OpenCode how to work on chrome-local-mcp 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 chrome-local-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to thronapple/chrome-local-mcp. 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/thronapple/chrome-local-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/thronapple/chrome-local-mcp

Made for: Codex, OpenCode.

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 chrome-local-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/thronapple/chrome-local-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/thronapple/chrome-local-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/thronapple/chrome-local-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/thronapple/chrome-local-mcp/agents-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 chrome-local-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/thronapple/chrome-local-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/thronapple/chrome-local-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 714 This file is loaded in full into every session.
When invoked 714 The same file — it is already loaded in full.
Security scan B 2 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.00714 $0.00714
Opus 5.5 $0.00286 $0.00286
Sonnet 5.5 $0.00143 $0.00143
Haiku 4.5 $0.00071 $0.00071

Measured 2mo ago against content hash 974c64fa8a0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

chrome-local-mcp AGENTS.md scanned grade B with 2 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Edit `~/.codex/config.toml`:

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:9222/json/version # Verify Chrome CDP is reachable
AGENTS.md · 74 lines

How it starts

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

AGENTS.md

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

Project Overview

chrome-local-mcp is a lightweight MCP (Model Context Protocol) server that connects to a Windows Chrome instance via CDP (Chrome DevTools Protocol). Designed for WSL environments where Codex needs to control a real browser with human-in-the-loop support for CAPTCHAs and verification challenges.

Build & Run

npm run build          # Compile TypeScript → dist/
npm run dev            # Watch mode
npm start              # Run the MCP server (requires Chrome with --remote-debugging-port=9222)

Register with Codex

Codex mcp add --scope user chrome-local -- node /mnt/d/repository/chrome-local-mcp/dist/index.js

Register with Codex CLI

Edit ~/.codex/config.toml:

[mcp_servers.chrome-local]
command = ["node", "/mnt/d/repository/chrome-local-mcp/dist/index.js"]

Test

npm test                           # Quick tool listing test
curl http://localhost:9222/json/version  # Verify Chrome CDP is reachable

Prerequisites

Windows Chrome must be running with remote debugging:

chrome.exe --remote-debugging-port=9222

Architecture

Codex (WSL) → stdio → MCP Server (WSL/Node.js) → CDP WebSocket → Chrome (Windows)
  • Transport: stdio (MCP standard for CLI agents)
  • CDP connection: chrome-remote-interface npm package, single persistent connection with auto-reconnect
  • Token strategy: Long content saved to temp files (/tmp/chrome-mcp/), only summaries returned to LLM context

Source Structure

  • src/index.ts — Entry point, CLI arg parsing, server bootstrap
  • src/cdp.ts — CDP connection management (connect, reconnect, target switching)
  • src/detect.ts — Shared challenge auto-detection (Cloudflare, CAPTCHA, login walls, etc.)
  • src/tools/navigation.ts — navigate, wait_for, go_back
  • src/tools/content.ts — get_content (smart extraction), evaluate (JS exec), screenshot
  • src/tools/interaction.ts — click, fill, press_key, scroll
  • src/tools/tabs.ts — tab_list, tab_open, tab_switch, tab_close
  • src/tools/search.ts — Google search with auto CAPTCHA detection
  • src/tools/human.ts — wait_for_human, check_page_status
  • src/types/chrome-remote-interface.d.ts — Type declarations for CDP client

Read the full file on GitHub · 74 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 · 74 lines · 714 tokens per session scan B 974c64fa8a0a

Subscribe to this mod's changes

chrome-local-mcp AGENTS.md is an instructions file published in the GitHub repository thronapple/chrome-local-mcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 714 tokens to every session, about $0.0029 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

chrome-local-mcp AGENTS.md compared with instructions from other repositories

chrome-local-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chrome-local-mcp AGENTS.mdthronapple/chrome-local-mcpInstructions file03mo agoMITB714Codex, OpenCode
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,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot