Chrome MCP Bridge
AI-driven browser automation for real Chrome with cookies, login sessions, and extensions intact, enabling Claude Code to control a visible Chrome browser via the Chrome DevTools Protocol.
README
Chrome MCP Bridge
Part of a 24/7 fully-automated unmanned software development system. This is a standalone component; the core system is proprietary.
AI-driven browser automation for real Chrome — with cookies, login sessions, and extensions intact.
This stdio MCP server lets Claude Code (claude --print) control a visible Chrome browser through the Chrome DevTools Protocol. Unlike headless automation, everything happens in a real browser window — government reviewers can watch every action live.
What It Does
An AI agent can:
- Navigate to any URL (government portals, internal systems)
- Read page content and accessibility trees
- Fill forms automatically (text fields, dropdowns, radio buttons)
- Click buttons and submit forms
- Take screenshots at every step for audit trails
- Execute JavaScript for advanced interactions
All operations use the user's real Chrome profile — existing logins, cookies, and sessions are preserved.
Requirements
| Requirement | Version |
|---|---|
| Python | 3.10+ |
| Google Chrome | macOS |
| pip packages | mcp, websockets (installed by setup) |
Quick Start (Clean Machine)
# 1. Clone and install
cd chrome-mcp-bridge
bash setup.sh
# 2. Launch Chrome with debugging
./launch_chrome.sh
# 3. Run the demo
python3 scripts/demo.py
Screenshots are saved to demo_output/.
Usage with Claude Code
Option A: One-shot command
claude --print --mcp-config mcp-config.json \
"Navigate to google.com and take a screenshot"
Option B: Add to any project
Copy the generated mcp-config.json into your project as .mcp.json, or add the server block manually:
{
"mcpServers": {
"chrome": {
"command": "python3",
"args": ["/absolute/path/to/src/chrome_mcp_server.py"],
"env": { "CHROME_CDP_PORT": "9222" }
}
}
}
setup.sh generates mcp-config.json with the correct absolute path automatically.
Available Tools
| Tool | Description |
|---|---|
navigate(url) |
Navigate to a URL |
screenshot() |
Capture JPEG screenshot |
click(coordinate) |
Click at [x, y] |
type_text(text) |
Type keyboard text |
key(keys) |
Press key combo (e.g. cmd+a, Enter) |
scroll(coordinate, direction, amount) |
Scroll at position |
hover(coordinate) |
Hover mouse |
drag(start, end) |
Drag from [x1,y1] to [x2,y2] |
find(query) |
Find elements by natural language description |
form_input(ref, value) |
Fill form field (CSS selector or x,y) |
read_page(filter) |
Read accessibility tree (all / interactive) |
get_page_text() |
Extract visible page text |
javascript(code) |
Execute JS in active tab |
read_console() |
Read browser console logs |
tabs_context() |
List open tabs |
tabs_create(url) |
Open new tab |
tabs_close(tab_id) |
Close tab |
tabs_switch(tab_id) |
Switch to tab |
file_upload(paths) |
Upload files to file input |
wait(duration) |
Wait N seconds |
Architecture
claude --print / Claude Code
| stdio (MCP JSON-RPC)
v
chrome_mcp_server.py
|
+-- Primary: chrome-native-host socket (Claude extension)
+-- Fallback: Chrome DevTools Protocol (CDP) via websocket
|
v
Google Chrome (--remote-debugging-port=9222)
The server auto-detects which backend is available. CDP mode works without the Claude extension.
Demo Script
scripts/demo.py runs an end-to-end demonstration:
- Navigates to a form page (httpbin.org)
- Screenshots the empty form
- Finds and fills all form fields automatically
- Screenshots the filled form
- Submits the form
- Screenshots and reads the result
# Chrome must be running with debugging first
./launch_chrome.sh
python3 scripts/demo.py
Output screenshots are saved to demo_output/ for review.
Troubleshooting
"Could not connect to Chrome"
- Ensure Chrome is running with
--remote-debugging-port=9222 - Verify:
curl http://localhost:9222/json/version
Chrome won't start (port in use)
- Another Chrome instance may hold the port. Close it or use a different port:
./launch_chrome.sh 9333
Profile/cookies not loading
- If Chrome is already running normally, it locks the profile. Close Chrome first, then launch via the script.
setup.sh fails on pip install
- Ensure
pip3is available:python3 -m ensurepip --upgrade - Or use a virtual environment:
python3 -m venv .venv && source .venv/bin/activate && bash setup.sh
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。