chrome-devtools
chrome-devtools is a profile-aware command-line wrapper for running Chrome DevTools MCP operations with isolated Chrome user data directories.
The tool is designed to be called as a regular CLI from agent skills. It is not registered in Hermes as an MCP server.
Agent Skill Installation
This repository is also a single-skill repository. Install the skill with the Vercel Labs skills CLI:
Install it for Codex explicitly:
Install it globally:
For local development, install from a checkout:
Design
- Profiles are explicit: every operation that targets a browser profile requires
--profile <name>. - Profiles own their Chrome user data directory and DevTools port.
- Profiles are read from
~/.config/chrome-devtools/config.toml. - If the config file is missing on startup, the CLI creates a
defaultprofile using~/.config/chrome-devtools/profiles/default. user_data_diris optional; when omitted, it defaults to~/.config/chrome-devtools/profiles/<profile-name>.- Prefer
user_data_dirvalues under~/.config/chrome-devtools/profiles/<profile-name>so Chrome profile data stays with the tool config. - The CLI may execute
chrome-devtools-mcpinternally for a selected profile. - MCP JSON-RPC input and output are routed through one long-lived per-profile daemon by default.
- Hermes-side Chrome DevTools MCP registration is not required for this workflow.
- Snapshot
uidvalues are MCP-process-local. Keeptake_snapshot -> click/fillon the same profile daemon, or in one direct MCP process when bypassing the daemon. - The daemon owns one
chrome-devtools-mcpprocess per profile, so multiple CLI invocations do not create competing MCP processes for the same Chrome profile. mcp direct-callandmcp direct-listremain available as a fallback and take a per-profile lock under~/.cache/chrome-devtools/locks.
Configuration
[[]]
= "default"
= 9222
Commands
mcp list starts the profile daemon when needed, queries tools/list through that daemon, and prints the raw MCP JSON response.
mcp call starts the profile daemon when needed, forwards stdin JSON-RPC lines to the daemon-owned chrome-devtools-mcp process, waits for the matching JSON-RPC responses, and prints them to stdout. Each CLI invocation is serialized by the daemon, but the MCP process stays alive across invocations.
mcp exec reads a JSON array of steps from --script and runs each step in order through the profile daemon. One initialize handshake is performed; then each tool step is issued as a tools/call and each sleep_ms step pauses the runner. Results are printed as a JSON array to stdout, so callers can inspect them programmatically without parsing line-delimited JSON-RPC. Step shapes:
Important: take_snapshot result uid values are local to the running MCP process. The daemon keeps that MCP process alive for the selected profile, so a later click/fill can use snapshot state from an earlier daemon-routed invocation as long as the daemon has not restarted.
daemon start starts one background broker for the profile. Daemon metadata lives under ~/.cache/chrome-devtools/daemons. daemon stop asks the broker to stop and cleans up its socket/pid files.
mcp direct-call and mcp direct-list bypass the daemon and run chrome-devtools-mcp directly. Use them only for fallback/manual debugging; they cannot preserve snapshot state across independent process invocations.
See docs/session-daemon-design.md for the per-profile daemon/broker design and future session ownership direction.
mcp help prints MCP-specific usage, examples, and notes about stdio JSON-RPC forwarding.
Development
This repository intentionally provides Rust through the Nix flake development shell. Do not assume cargo is installed globally.