Skip to main content

Session-local Chrome launcher for Chrome DevTools MCP workflows.

Project description

chrome-devtools-mcp-canpoint

Session-local Chrome launcher for Chrome DevTools MCP workflows.

This wrapper starts one dedicated Chrome process per MCP server process. Each session gets its own random remote debugging port and a generated user data directory under the current working directory, so multiple agent sessions do not fight over port 9222 or a shared Chrome profile.

Usage

Run it directly with uvx:

uvx chrome-devtools-mcp-canpoint -- <downstream-mcp-command>

Example:

uvx chrome-devtools-mcp-canpoint -- npx -y chrome-devtools-mcp@latest --browser-url={browser_url}

If Chrome is not installed in the default Windows location, pass it explicitly:

uvx chrome-devtools-mcp-canpoint --chrome-path "D:\Apps\Chrome\chrome.exe" -- npx -y chrome-devtools-mcp@latest --browser-url={browser_url}

Codex MCP Config

After publishing to PyPI, configure Codex like this:

[mcp_servers.chrome-devtools]
command = "uvx"
args = [
  "chrome-devtools-mcp-canpoint",
  "--",
  "npx",
  "-y",
  "chrome-devtools-mcp@latest",
  "--browser-url={browser_url}",
  "--no-usage-statistics"
]
startup_timeout_sec = 60

Session Profile Directory

By default, generated Chrome profiles are created under:

<current-working-directory>/.chrome-mcp-sessions/<uuid>

Override the parent directory with --session-root:

uvx chrome-devtools-mcp-canpoint --session-root .\.chrome-mcp-sessions -- npx -y chrome-devtools-mcp@latest --browser-url={browser_url}

Use --user-data-dir only when you want an exact profile directory instead of a generated per-session subdirectory.

Environment Passed to the Downstream MCP

The downstream command receives these variables:

  • CHROME_DEVTOOLS_URL: http://127.0.0.1:<random-port>
  • BROWSER_URL: same value as CHROME_DEVTOOLS_URL
  • CHROME_REMOTE_DEBUGGING_PORT: selected port
  • CHROME_USER_DATA_DIR: session profile path

Configure the real Chrome MCP package to use one of these values as its browser endpoint. This wrapper also expands placeholders in downstream command arguments:

  • {browser_url} or {devtools_url}: http://127.0.0.1:<random-port>
  • {port}: selected port
  • {user_data_dir}: generated profile path

Cleanup

When the downstream MCP exits, this wrapper terminates only the Chrome process it started. Temporary profiles are deleted by default.

Use --keep-profile when debugging:

uvx chrome-devtools-mcp-canpoint --keep-profile -- npx -y chrome-devtools-mcp@latest --browser-url={browser_url}

Options

uvx chrome-devtools-mcp-canpoint --help

Useful options:

  • --chrome-path: path to chrome.exe
  • --session-root: parent directory for generated project-local profiles
  • --user-data-dir: explicit profile directory instead of a generated one
  • --keep-profile: leave the temporary profile on disk
  • --headless: start Chrome with --headless=new
  • --chrome-arg: pass extra arguments to Chrome, repeatable
  • --devtools-timeout: seconds to wait for /json/version

Development

Use the project virtual environment for local development:

.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\python.exe -m unittest discover -v
.\.venv\Scripts\chrome-devtools-mcp-canpoint.exe --help

Build distributions:

.\.venv\Scripts\python.exe -m build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chrome_devtools_mcp_canpoint-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chrome_devtools_mcp_canpoint-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file chrome_devtools_mcp_canpoint-0.1.0.tar.gz.

File metadata

File hashes

Hashes for chrome_devtools_mcp_canpoint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51e5ed850d1842356118fd62870bfc2902632ecaebb28a42aaf06094b96ce909
MD5 c5bad6a232376118adffd0b04205b66c
BLAKE2b-256 f15769066830a2881df16a360b7adfbd9ec661e5cd80ac3728fc3a9391105e21

See more details on using hashes here.

File details

Details for the file chrome_devtools_mcp_canpoint-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chrome_devtools_mcp_canpoint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb3b7e2984dc432254e9d69723b3684b2d53d5c4bfade9e3a7e71d3cac0380a
MD5 612dd481d6cf802c2995848933ee7433
BLAKE2b-256 2248555c011f0564f2f8309520b0623ac2d73cf0ba515923dacb3825be74ae63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page