chrome-devtools-mcp-wrapper
A wrapper around chrome-devtools-mcp that adds dynamic multi-browser routing, allowing connection to and switching between multiple Chrome instances at runtime.
README
chrome-devtools-mcp-wrapper
A dynamic multi-browser wrapper around chrome-devtools-mcp that lets your AI coding agent connect to multiple Chrome instances at once and switch between them at runtime — without restarting the MCP server.
Implements the feature proposed in ChromeDevTools/chrome-devtools-mcp#590.
Key features
- Dynamic browser routing: connect to any number of Chrome instances and route each tool call to the right one via an optional
browserUrlargument. - Runtime switching: call
switch_browserto change the active browser without restarting anything. - All upstream tools included: every tool from
chrome-devtools-mcpis proxied automatically, plus two wrapper-native tools (switch_browser,list_browsers). - No fork: runs
npx chrome-devtools-mcp@latestas a subprocess, so upstream updates are picked up automatically.
Getting started
Add the following config to your MCP client:
{
"mcpServers": {
"chrome-devtools-wrapper": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp-wrapper@latest"]
}
}
}
To connect to an already-running Chrome instance at startup:
{
"mcpServers": {
"chrome-devtools-wrapper": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp-wrapper@latest", "--browser-url=http://127.0.0.1:9222"]
}
}
}
[!NOTE] Using
chrome-devtools-mcp-wrapper@latestensures your MCP client always uses the latest version.
MCP client configuration
<details> <summary>Claude Code</summary>
Install via CLI (MCP only)
Use the Claude Code CLI to add the wrapper (guide):
claude mcp add chrome-devtools-wrapper --scope user -- npx -y chrome-devtools-mcp-wrapper@latest
</details>
<details> <summary>Copilot / VS Code</summary>
Click the button to install:
Or install manually:
Follow the VS Code MCP configuration guide and use the standard config above, or use the CLI:
For macOS and Linux:
code --add-mcp '{"name":"chrome-devtools-wrapper","command":"npx","args":["-y","chrome-devtools-mcp-wrapper@latest"],"env":{}}'
For Windows (PowerShell):
code --add-mcp '{"""name""":"""chrome-devtools-wrapper""","""command""":"""npx""","""args""":["""-y""","""chrome-devtools-mcp-wrapper@latest"""]}'
</details>
<details> <summary>Cursor</summary>
Click the button to install:
<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">
Or install manually:
Go to Cursor Settings → MCP → New MCP Server and paste the standard config above.
</details>
<details> <summary>Kiro</summary>
In Kiro Settings, go to Configure MCP → Open Workspace or User MCP Config and paste the standard config above.
Or from the IDE Activity Bar → Kiro → MCP Servers → Open MCP Config.
</details>
<details> <summary>JetBrains AI Assistant & Junie</summary>
Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) → Add. Use the standard config above.
For Junie: Settings | Tools | Junie | MCP Settings → Add.
</details>
<details> <summary>Claude Desktop</summary>
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Paste the standard config above.
</details>
<details> <summary>Cline</summary>
Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the standard config above.
</details>
<details> <summary>Gemini CLI</summary>
gemini mcp add chrome-devtools-wrapper npx chrome-devtools-mcp-wrapper@latest
Or globally:
gemini mcp add -s user chrome-devtools-wrapper npx chrome-devtools-mcp-wrapper@latest
</details>
<details> <summary>Codex</summary>
Follow the configure MCP guide and use the standard config above.
On Windows 11, configure the Chrome install location and increase the startup timeout by updating .codex/config.toml:
[mcp_servers.chrome-devtools-wrapper]
command = "cmd"
args = ["/c", "npx", "-y", "chrome-devtools-mcp-wrapper@latest"]
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
startup_timeout_ms = 20_000
</details>
Requirements
Usage
1. Start Chrome with remote debugging
macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/chrome-profile
Linux
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile
Windows
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\chrome-profile"
[!WARNING] Enabling the remote debugging port exposes a debugging interface that any local application can connect to. Avoid browsing sensitive websites while the port is open.
2. Connect to your browser
switch_browser(url: "9222")
Or with a full URL or WebSocket endpoint:
switch_browser(url: "http://127.0.0.1:9222")
switch_browser(url: "ws://127.0.0.1:9222/devtools/browser/abc123")
After connecting, all chrome-devtools-mcp tools become available.
3. Use any browser tool
navigate_page(url: "https://example.com")
take_screenshot()
evaluate_script(expression: "document.title")
4. Route a single call to a specific browser
Every proxied tool accepts an optional browserUrl argument:
navigate_page(url: "https://staging.example.com", browserUrl: "9333")
take_screenshot(browserUrl: "9222")
5. Check active connections
list_browsers()
Wrapper-native tools
These two tools are always available, even before a browser connects:
| Tool | Description |
|---|---|
switch_browser(url) |
Connect to a browser and set it as the default. Accepts a full URL, WebSocket endpoint, or bare port number (e.g. "9222"). |
list_browsers() |
List all active browser backends and which is the current default. |
All other tools come from chrome-devtools-mcp and are registered once a browser connects.
Configuration options
WebSocket endpoint
If you know the exact WebSocket endpoint (from http://127.0.0.1:9222/json/version → webSocketDebuggerUrl):
{
"mcpServers": {
"chrome-devtools-wrapper": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp-wrapper@latest",
"--browser-url=ws://127.0.0.1:9222/devtools/browser/<id>"
]
}
}
}
Multiple browsers
Start multiple Chrome instances on different ports, then route calls dynamically:
switch_browser(url: "9222")
navigate_page(url: "https://prod.example.com")
navigate_page(url: "https://staging.example.com", browserUrl: "9333")
take_screenshot(browserUrl: "9333")
How it works
MCP client (Claude Code, Cursor, etc.)
│
▼
chrome-devtools-mcp-wrapper
├── switch_browser / list_browsers ← always available
├── navigate_page(browserUrl?) ─┐
├── take_screenshot(browserUrl?) ├─ proxied from chrome-devtools-mcp
├── evaluate_script(browserUrl?) │ registered after first browser connects
└── ... (50+ tools) ─┘
│ │
▼ ▼
backend [9222] backend [9333]
npx chrome- npx chrome-
devtools-mcp devtools-mcp
--browserUrl= --browserUrl=
...9222 ...9333
- One
chrome-devtools-mcpsubprocess per browser URL, reused across calls - Idle backends are killed after 5 minutes of inactivity
- Upstream updates are inherited automatically on restart
Relation to upstream
This package wraps chrome-devtools-mcp without forking it. All 50+ upstream tools are proxied transparently.
For single-browser use cases, the upstream package is the right choice. Use this wrapper when you need to connect to multiple Chrome instances or switch between them at runtime.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。