MCP server for controlling Chrome over the DevTools Protocol (CDP).
Project description
chrome-remote-debugging-mcp
MCP server that controls a running Chrome over the Chrome DevTools Protocol (CDP). It connects to Chrome's remote-debugging endpoint and exposes browser control as MCP tools.
Requirements
-
Python ≥ 3.10
-
A Chrome/Chromium started with remote debugging:
google-chrome --remote-debugging-port=9222
Register with an MCP client
Example mcpServers entry:
{
"mcpServers": {
"chrome-remote-debugging": {
"command": "uvx",
"args": ["chrome-remote-debugging-mcp"],
"env": { "CDP_URL": "http://localhost:9222" }
}
}
}
Tools
| Tool | Args | Returns |
|---|---|---|
ping |
— | {connected, cdp_url, browser, protocol} |
list_tabs |
— | {"tabs": [{id, title, url, type}, ...]} |
navigate |
url, tab_id? |
{tab_id, url, frameId} |
evaluate |
expression, tab_id? |
{tab_id, value, type} |
cdp_command |
method, params?, tab_id? |
{tab_id, method, result} |
cdp_command is a raw CDP escape hatch: pass any CDP method + params and get
the raw response, for cases the typed tools above don't cover. It targets a page
socket, so page-domain methods work (Page.*, DOM.*, Runtime.*,
Network.*, …); browser-level domains (Browser.*, Target.*) do not.
On any Chrome connection problem a tool returns {"error": "..."} instead of
crashing.
Configuration
| Env var | Default | Meaning |
|---|---|---|
CDP_URL |
http://localhost:9222 |
Chrome remote-debugging origin |
SSH tunnel (optional)
To control a Chrome that only listens on a remote host's loopback, set:
| Env var | Default | Meaning |
|---|---|---|
CDP_URL |
http://localhost:9222 |
Chrome endpoint. With a tunnel active, the remote-side address to forward to. |
SSH_PROXY_TO |
unset | SSH target, e.g. user@remote. Presence enables the tunnel. |
SSH_PROXY_PORT |
unset | Fixed local port. Auto-assigned when unset. |
The server runs ssh -N -L 127.0.0.1:<local>:<host>:<port> <target> and points
CDP at the forwarded port. Requires key-based SSH auth (BatchMode=yes) and the
ssh client on PATH. The tunnel uses StrictHostKeyChecking=accept-new
(trust-on-first-use: unknown host keys are accepted automatically on first
connect).
Develop
uv sync # venv + runtime + dev group
pytest -q
Locally, from a checkout (no publish needed):
uvx --from . chrome-remote-debugging-mcp
# or
python -m chrome_remote_debugging_mcp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chrome_remote_debugging_mcp-0.1.0.tar.gz.
File metadata
- Download URL: chrome_remote_debugging_mcp-0.1.0.tar.gz
- Upload date:
- Size: 99.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77419c22175f383c948f77ca10274ea0e201d904fb5afa6f4a1e9348a785da60
|
|
| MD5 |
b637300d7a4f0c74990a8bb4667ba200
|
|
| BLAKE2b-256 |
8918057dbe6800586ac0f388287013ca4f4fd5389951d2fe0c63e635818c3447
|
Provenance
The following attestation bundles were made for chrome_remote_debugging_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on danilin-em/chrome-remote-debugging-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chrome_remote_debugging_mcp-0.1.0.tar.gz -
Subject digest:
77419c22175f383c948f77ca10274ea0e201d904fb5afa6f4a1e9348a785da60 - Sigstore transparency entry: 2189229323
- Sigstore integration time:
-
Permalink:
danilin-em/chrome-remote-debugging-mcp@8698087f8a97f1dd5b8c3302e7ee5d6c848b80d0 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/danilin-em
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8698087f8a97f1dd5b8c3302e7ee5d6c848b80d0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file chrome_remote_debugging_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chrome_remote_debugging_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d648299775496d3d5fcd7fbe1b20348cc6552e8dd6f52e2600699cd3462c408
|
|
| MD5 |
c969677a9775178606e8fe4b46b115df
|
|
| BLAKE2b-256 |
b62a9466e893ab5f5ecd8d1047384c3dc1eb3747ec80da587ae528f4be716e91
|
Provenance
The following attestation bundles were made for chrome_remote_debugging_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on danilin-em/chrome-remote-debugging-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chrome_remote_debugging_mcp-0.1.0-py3-none-any.whl -
Subject digest:
8d648299775496d3d5fcd7fbe1b20348cc6552e8dd6f52e2600699cd3462c408 - Sigstore transparency entry: 2189229343
- Sigstore integration time:
-
Permalink:
danilin-em/chrome-remote-debugging-mcp@8698087f8a97f1dd5b8c3302e7ee5d6c848b80d0 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/danilin-em
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8698087f8a97f1dd5b8c3302e7ee5d6c848b80d0 -
Trigger Event:
release
-
Statement type: