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.
npx agentmods add instructions/anirbandz/chrome_mcp_devtool/copilot-instructionsgit clone --depth 1 https://github.com/Anirbandz/Chrome_MCP_DEVTOOLWrote 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.
[](https://agentmods.dev/instructions/anirbandz/chrome_mcp_devtool/copilot-instructions)<a href="https://agentmods.dev/instructions/anirbandz/chrome_mcp_devtool/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/anirbandz/chrome_mcp_devtool/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01139 | $0.01139 |
| Opus 5 | $0.00570 | $0.00570 |
| Sonnet 5 | $0.00228 | $0.00228 |
| Haiku 4.5 | $0.00114 | $0.00114 |
Grade A, and why
Chrome_MCP_DEVTOOL copilot-instructions.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.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Quick orientation — Chrome DevTools MCP
This repository implements an MCP (Model-Context-Protocol) server that exposes
Chrome DevTools functionality to MCP clients (Copilot, Gemini, Claude, Cursor,
etc.). The server is written in TypeScript, built to build/src, and launched
via the CLI wrapper npx chrome-devtools-mcp@latest (or npm run start).
Keep this short, actionable, and specific to this codebase.
Core architecture (what matters)
- Entry:
src/index.ts->src/main.ts(parses CLI, constructs an MCP server). - MCP glue:
third_party/index.js(MCP SDK shims/types) andsrc/main.tswhere tools are registered usingserver.registerTool(...). - Tool implementations:
src/tools/*.ts(each tool exports a ToolDefinition withname,schema,annotations, andhandler). Seesrc/tools/pages.tsandsrc/tools/performance.tsfor examples. - Browser control & lifecycle:
src/browser.ts(connects to or launches Chrome via Puppeteer). It supports--wsEndpoint,--browserUrl, or launching a new browser using--channel,--executablePath,--headless. - Runtime context:
src/McpContext.tsmanages pages, snapshots, network and console collectors. Use it as the single source of truth for page state.
Key workflows & commands (copyable)
-
Build (produces
build/src):npm run build
-
Start server (build + run):
npm run start
-
Start with debug logs (writes verbose logs when DEBUG env is set):
npm run start-debug
-
Run tests (note: tests run against the built JS in
build/tests):npm test
-
Quick manual run (connect to existing Chrome via WebSocket):
npx chrome-devtools-mcp@latest --wsEndpoint ws://127.0.0.1:9222/devtools/browser/
Notable runtime details
- Node requirement: >= 20.19 LTS (enforced at startup in
src/index.ts). - Chrome: the server either launches Chrome via Puppeteer (pinned in
package.json) or connects to an existing instance via
--wsEndpointor--browserUrl. - CLI flags and validation:
src/cli.ts(use this for acceptable options and coercions — e.g.,--wsHeadersmust be a JSON object). - Logs:
--logFilewrites Puppeteer process stdout/stderr to a file (seesrc/browser.ts). For debugging internal flows setDEBUG=mcp:*.
Project conventions & patterns to follow
- TypeScript-first: edit
.tsfiles insrc/, runnpm run buildto emit JS intobuild/src. Tests operate on built output. - Post-build pipeline:
npm run buildrunstscthenscripts/post-build.ts(it strips types/adjusts imports). The published CLI usesbuild/src/index.js. - Tools are objects (ToolDefinition) exported from
src/tools/*. They are registered centrally insrc/main.ts— follow the same export shape. - Single-threaded tool handling: a global Mutex serializes tool handlers
(
src/main.ts). Tool handlers should be short and rely onMcpContextto perform long-running actions viawaitForEventsAfterActionwhere needed.
Integration points and external dependencies
- Puppeteer (launch/connect):
src/browser.ts. Behavior differs if using--wsEndpoint/--browserUrl(connect) vs launching (channel/executable). - chrome-devtools-frontend: used to read DevTools UI state (see
McpContext.getDevToolsDatawhich evaluates code insidedevtools://pages). - MCP SDK & helper types:
third_party/index.js(bridges MCP types and Stdio transport). Look here for how the MCP server and transport are used.
Examples (useful jump-to locations)
- Registering tools:
src/main.ts(functionregisterTool) — follow the logging, error handling and mutex pattern when adding features. - Context and page management:
src/McpContext.ts— page snapshots, network collectors, console collectors, and snapshot id conventions are implemented here. - CLI options & validation:
src/cli.ts(input coercion examples like viewport parsing and wsHeaders JSON parsing).
When editing or adding code
- Run
npm run typecheckandnpm testafternpm run build. - Preserve runtime behavior: tests and publishing rely on compiled output in
build/srcand the post-build script — do not changebinor the build pipeline without updatingscripts/post-build.tsandrollup.config.mjs.
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.
- 4d ago First seen · 96 lines · 1,139 tokens per session scan A dcb70367232e
Chrome_MCP_DEVTOOL copilot-instructions.md is an instructions file published in the GitHub repository Anirbandz/Chrome_MCP_DEVTOOL (0 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 1,139 tokens to every session, about $0.0057 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-31.
Other instructions, from other repositories
Browser4 CLAUDE.md
Claude Code instructions for platonai/Browser4, covering browser4 — project context for claude, architecture, key dispatch chain (cli → browser), batch commands and e2e test structure.
cc-websearch CLAUDE.md
Claude Code instructions for Djarvur/cc-websearch, covering project, constraints, technology stack, what not to add and conventions.
fix-quera AGENTS.md
Instructions for AlirezaKeshavarz83/fix-quera, covering agent guidance, project shape, visual style, quera page data findings and compatibility findings.
sniff AGENTS.md
AGENTS.md instructions for Aboudjem/sniff, covering agents.md: sniff, what this repo is, how an agent should use sniff, handling the playwright setup gate and finding output schema.
fast-browser CLAUDE.md
Claude Code instructions for m4ttstack/fast-browser, covering fast browser plugin, where a change belongs, fork branch: use fast-browser-runtime, releasing a new runtime and re-pinning this repo: use the script.
sendblue-browser-use AGENTS.md
Instructions for sendblue-api/sendblue-browser-use, covering agents.md — sendblue-browser-use, what this repo is, setup, common commands and health (no auth).