Commit 216b159
committed
feat(mcp): wire chrome-devtools-mcp for Claude Code via nix+just
Add a Model Context Protocol server that gives Claude (and other MCP
clients) real Chrome-DevTools access — evaluate_script, console capture,
take_screenshot, network inspection, etc. — against Playwright's
nix-provided Chrome-for-Testing. Targets headless Linux.
Wiring:
- .mcp.json at repo root registers a "chrome-devtools" server that
shells out via `nix develop --command just mcp-chrome-devtools`.
Claude Code starts outside the devshell, so the nix-develop wrapper
is mandatory — it bridges into the devshell where KOLU_CHROME_EXECUTABLE
is set and npx/node are on PATH.
- justfile gains a `mcp-chrome-devtools` recipe that execs
`npx -y chrome-devtools-mcp@latest` with --headless, --isolated, and
--executable-path pinned to the resolved chrome binary. Keeps command
complexity out of .mcp.json.
- shell.nix computes the chrome path at Nix eval time by reading
playwright-driver's browsers.json (idiom from wiki.nixos.org/wiki/Playwright)
— fails loud on layout change, warm `nix develop` eval stays at ~0.2s.
Telemetry: chrome-devtools-mcp sends usage stats to Google by default
(and trace URLs to Chrome CrUX for performance traces). Left on for the
prototype; add `--no-usage-statistics --no-performance-crux` to the just
recipe if that's unwanted.1 parent 547cd9e commit 216b159
3 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
5 | 16 | | |
6 | 17 | | |
7 | 18 | | |
| |||
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| 25 | + | |
14 | 26 | | |
15 | 27 | | |
16 | 28 | | |
| |||
0 commit comments