cc-chrome-agent
MCP server to control Chrome browsers locally or remotely via the Claude extension, enabling navigation, form filling, screenshots, and JavaScript execution from any MCP client.
README
cc-chrome-agent
MCP server to control Chrome browsers on your network via Claude's Chrome extension.
Control any Chrome browser — locally or on remote machines — directly from Claude Code, Claude Desktop, or any MCP client. Navigate pages, fill forms, click buttons, take screenshots, run JavaScript, and more.
How it works
Claude Code / Claude Desktop / Any MCP Client
|
| MCP (stdio)
v
cc-chrome-agent (this server)
|
| Socket protocol (4-byte length-prefix + JSON)
v
Chrome + Claude Extension (local or remote)
The Claude Chrome extension exposes browser automation tools via a local Unix socket. This MCP server connects to that socket and makes those tools available to any MCP client.
For remote Chrome instances, a TCP bridge server proxies the socket over the network, with optional mDNS discovery.
Quick Start
1. Install
# From GitHub:
pip install git+https://github.com/delltrak/cc_chrome_agent.git
# With network discovery (mDNS):
pip install "cc-chrome-agent[network] @ git+https://github.com/delltrak/cc_chrome_agent.git"
Or from source:
git clone https://github.com/delltrak/cc_chrome_agent
cd cc_chrome_agent
pip install -e .
2. Prerequisites
- Chrome (or Chromium-based browser) with the Claude extension installed
- Open the Claude extension sidebar at least once to activate the native host
- Claude Code (or any MCP client)
3. Register with Claude Code
claude mcp add cc-chrome-agent -- cc-chrome-agent
4. Use it
Just ask Claude to interact with your browser:
> Open github.com and tell me the trending repos today
> Fill the login form with test@example.com and click submit
> Take a screenshot of the current page
> Run document.title in the browser console
Claude Code will use the MCP tools automatically.
If the browser is closed, cc-chrome-agent now tries to launch a local Chromium browser automatically and waits for the Claude bridge socket to appear. If the browser is already open, it reuses the existing local bridge.
Tools
Browser Control
| Tool | Description |
|---|---|
navigate |
Go to a URL, or navigate back/forward |
find |
Find elements by natural language ("login button", "search bar") |
form_input |
Fill form fields using element ref_ids |
computer |
Mouse clicks, keyboard input, screenshots, scrolling |
javascript |
Execute JavaScript in the page context |
screenshot |
Capture a screenshot of the current tab |
Page Reading
| Tool | Description |
|---|---|
read_page |
Get the accessibility tree with element ref_ids |
get_page_text |
Get the full text content of the page |
preview_snapshot |
Lightweight accessibility tree snapshot |
read_console |
Read browser console messages |
read_network |
Inspect network requests |
Tab Management
| Tool | Description |
|---|---|
list_tabs |
List all open tabs |
create_tab |
Open a new tab |
resize_window |
Resize the browser window |
Network (Meta)
| Tool | Description |
|---|---|
discover_bridges |
Find Chrome instances on the local network |
connect_bridge |
Connect to a local or remote Chrome |
connection_status |
Check current connection status |
Local Browser Bootstrap
When a tool needs local Chrome and no bridge socket exists yet, the server will:
- Reuse an existing local socket if one is already available.
- Try to launch a local Chromium browser automatically.
- Wait for the Claude extension socket to appear.
- Reconnect automatically if the local socket drops mid-session.
Important caveat: the Claude extension still needs to be installed and activated on that machine. On a fresh install, open the extension sidebar once so the native host socket can be created.
Network Mode
Control Chrome on remote machines (e.g., a test server, a colleague's desktop).
On the remote machine
# Install and start the bridge server:
pip install cc-chrome-agent
cc-chrome-agent serve
# With specific port:
cc-chrome-agent serve --port 9000
The bridge server:
- Finds the local Chrome socket automatically
- Exposes it via TCP
- Advertises via mDNS (if zeroconf is installed)
From your machine
> Discover Chrome bridges on the network
> Connect to the bridge at 192.168.1.20
> Navigate to example.com and take a screenshot
Or discover from the command line:
cc-chrome-agent discover
cc-chrome-agent discover --scan # TCP subnet scan (no mDNS needed)
cc-chrome-agent discover --json # JSON output
Configuration
Claude Code
# Register the MCP server:
claude mcp add cc-chrome-agent -- cc-chrome-agent
# With verbose logging:
claude mcp add cc-chrome-agent -- cc-chrome-agent --verbose
# Remove:
claude mcp remove cc-chrome-agent
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"cc-chrome-agent": {
"command": "cc-chrome-agent"
}
}
}
Manual MCP config
{
"mcpServers": {
"cc-chrome-agent": {
"command": "python3",
"args": ["-m", "cc_chrome_agent"]
}
}
}
Skip permission prompts
When Claude Code uses Chrome tools for the first time, the extension asks whether to "Act without asking" or "Ask before acting". To skip this prompt and always allow actions automatically, set this environment variable:
# Add to your ~/.zshrc or ~/.bashrc:
export CLAUDE_CHROME_PERMISSION_MODE="skip_all_permission_checks"
Available modes:
| Mode | Behavior |
|---|---|
ask |
Prompt before each action (default) |
skip_all_permission_checks |
Act without asking |
follow_a_plan |
Follow a pre-approved plan |
Environment variables
Use these when the browser is not in a default location or when you want tighter startup control:
CC_CHROME_AGENT_BROWSER_COMMAND="/custom/browser/bin/chrome --profile-directory=Default"
CC_CHROME_AGENT_BROWSER_APP="Google Chrome"
CC_CHROME_AGENT_START_URL="about:blank"
CC_CHROME_AGENT_BOOT_TIMEOUT="20"
CC_CHROME_AGENT_AUTO_LAUNCH="1"
CC_CHROME_AGENT_BROWSER_COMMAND: full custom launch command, used firstCC_CHROME_AGENT_BROWSER_APP: preferred browser app or executable nameCC_CHROME_AGENT_START_URL: URL opened during auto-launchCC_CHROME_AGENT_BOOT_TIMEOUT: seconds to wait for the bridge socketCC_CHROME_AGENT_AUTO_LAUNCH: set to0to disable browser auto-launch
CLI Reference
cc-chrome-agent Start MCP server (stdio)
cc-chrome-agent serve Start TCP bridge for remote access
cc-chrome-agent discover Find Chrome bridges on the network
cc-chrome-agent --version Show version
cc-chrome-agent --verbose Enable debug logging
serve options
--port PORT TCP port (default: 8765)
--sock PATH Unix socket path (auto-detected)
--no-mdns Disable mDNS advertisement
--launch-timeout Seconds to wait for a bridge after auto-launch
--no-launch Disable local browser auto-launch
discover options
--timeout SECS Discovery timeout (default: 3.0)
--scan Force TCP subnet scan
--json JSON output
Supported Browsers
Any Chromium-based browser that supports the Claude extension:
- Google Chrome
- Chrome Canary
- Brave
- Microsoft Edge
- Arc
- Vivaldi
- Chromium
Architecture
┌─────────────────────────────────────────────────┐
│ MCP Client │
│ (Claude Code / Desktop / SDK) │
└──────────────────┬──────────────────────────────┘
│ MCP (stdio, JSON-RPC 2.0)
│
┌──────────────────▼──────────────────────────────┐
│ cc-chrome-agent │
│ │
│ ┌─────────────┐ ┌────────────┐ ┌──────────┐ │
│ │ MCP Server │ │ Bridge │ │ Discovery│ │
│ │ (tools) │──│ (protocol) │ │ (mDNS/ │ │
│ │ │ │ │ │ scan) │ │
│ └─────────────┘ └─────┬──────┘ └──────────┘ │
└──────────────────────────┼──────────────────────┘
│
┌────────────┼────────────┐
│ Local │ Remote │
│ │ │
┌────────▼───┐ ┌─────▼──────┐ │
│ Unix Socket│ │ TCP:8765 │ │
│ /tmp/... │ │ (bridge) │ │
└────────┬───┘ └─────┬──────┘ │
│ │ │
┌────────▼────────────▼───────┐ │
│ Chrome + Claude Extension│ │
│ (native host socket) │ │
└─────────────────────────────┘ │
Requirements
- Python 3.10+
- Chrome (or Chromium-based browser) with Claude extension
- Optional:
zeroconffor mDNS network discovery
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。