Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"chrome-devtools": {
"command": "nix",
"args": ["develop", "--command", "just", "ai::mcp-chrome-devtools"]
}
}
}
15 changes: 15 additions & 0 deletions agents/ai.just
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,18 @@ apm-sync: apm-audit
agent *args: apm
just prepare
{{ env('AI_AGENT', 'claude --dangerously-skip-permissions') }} {{ args }}

# Launch chrome-devtools-mcp server over stdio — wired up via the root
# `.mcp.json`, which shells out via `nix develop --command just
# ai::mcp-chrome-devtools` (Claude Code starts outside the nix devshell).
# Chrome binary resolved from Playwright's nix-provided Chrome-for-Testing
# across platforms: `chrome-linux64/chrome` on Linux and
# `chrome-mac-*/Google Chrome for Testing.app/.../Google Chrome for Testing`
# on macOS. `find` picks either layout; a miss fails loud downstream
# (empty --executable-path → MCP server errors out visibly).
#
# TODO: fold .mcp.json's entry into `dependencies.mcp` above once
# microsoft/apm#655 (Claude Code MCP adapter) merges and lands in juspay's
# fork — `.mcp.json` then becomes a generated artifact of `just ai::apm`.
mcp-chrome-devtools:
sh -c 'chrome="$(find "$PLAYWRIGHT_BROWSERS_PATH"/chromium-* \( -name chrome -o -name "Google Chrome for Testing" \) -type f -perm -u+x 2>/dev/null | head -1)"; exec npx -y chrome-devtools-mcp@latest --headless=true --isolated=true --executable-path="$chrome"'