Chrome_MCP_DEVTOOL copilot-instructions.md

Chrome_MCP_DEVTOOL copilot-instructions.md is an instructions file for GitHub Copilot from Anirbandz/Chrome_MCP_DEVTOOL. It costs 1,139 tokens per session, scanned A, original, Apache-2.0.

Instructions for a TypeScript MCP server that exposes Chrome DevTools features to coding agents. Chrome DevTools is the browser's built-in toolkit for inspecting pages, logs, network requests, and performance.

In plain words
What is it for?
Use them when adding or changing MCP tools, connecting to or launching Chrome, and working with page snapshots, network data, or console collectors.
Why use it?
They give agents a map of the server's entry points, browser connection options, tool implementations, and runtime context, making code changes easier to locate.

Instructions file for GitHub Copilot

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/anirbandz/chrome_mcp_devtool/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/Anirbandz/Chrome_MCP_DEVTOOL

Made for: GitHub Copilot.

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_MCP_DEVTOOL copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/anirbandz/chrome_mcp_devtool/copilot-instructions.svg)](https://agentmods.dev/instructions/anirbandz/chrome_mcp_devtool/copilot-instructions)
Your own site
<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>
Per session 1,139 This file is loaded in full into every session.
When invoked 1,139 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.01139 $0.01139
Opus 5 $0.00570 $0.00570
Sonnet 5 $0.00228 $0.00228
Haiku 4.5 $0.00114 $0.00114

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

Security

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.

.github/copilot-instructions.md · 96 lines

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) and src/main.ts where tools are registered using server.registerTool(...).
  • Tool implementations: src/tools/*.ts (each tool exports a ToolDefinition with name, schema, annotations, and handler). See src/tools/pages.ts and src/tools/performance.ts for 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.ts manages 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 --wsEndpoint or --browserUrl.
  • CLI flags and validation: src/cli.ts (use this for acceptable options and coercions — e.g., --wsHeaders must be a JSON object).
  • Logs: --logFile writes Puppeteer process stdout/stderr to a file (see src/browser.ts). For debugging internal flows set DEBUG=mcp:*.

Project conventions & patterns to follow

  • TypeScript-first: edit .ts files in src/, run npm run build to emit JS into build/src. Tests operate on built output.
  • Post-build pipeline: npm run build runs tsc then scripts/post-build.ts (it strips types/adjusts imports). The published CLI uses build/src/index.js.
  • Tools are objects (ToolDefinition) exported from src/tools/*. They are registered centrally in src/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 on McpContext to perform long-running actions via waitForEventsAfterAction where 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.getDevToolsData which evaluates code inside devtools:// 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 (function registerTool) — 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 typecheck and npm test after npm run build.
  • Preserve runtime behavior: tests and publishing rely on compiled output in build/src and the post-build script — do not change bin or the build pipeline without updating scripts/post-build.ts and rollup.config.mjs.

Read the full file on GitHub · 96 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 · 96 lines · 1,139 tokens per session scan A dcb70367232e

Subscribe to this mod's changes

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.