chrome-control-mcp
Drives tabs in the user's regular Chrome browser via a Manifest V3 extension, enabling tab listing/opening/switching/closing, navigation, DOM snapshots, clicking/typing, key presses, scrolling, waiting, screenshots, text extraction, downloads, and file uploads.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chrome-control-mcp Navigate the attached tab to news.ycombinator.com and summarize the top stories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chrome-control-mcp
Drive tabs in your regular Chrome browser from AI assistants (Antigravity, Claude Desktop, Claude Code, Codex, Cursor) over the Model Context Protocol (MCP) — using a Manifest V3 Chrome Extension instead of --remote-debugging-port or a separate automation Chrome profile.
Because it runs as a standard Chrome extension inside your everyday signed-in browser session, you keep your existing logins, cookies, and workspace tabs while controlling exactly which tabs an AI assistant can access.
Why an Extension Instead of CDP?
Uses your real Chrome window: No
--remote-debugging-port, no detached automation binary, and no separate Google sign-in profile.Explicit per-tab consent: Starts in Attached Tabs Only mode — only tabs you attach from the extension popup (or open via
browser_open_tab) can be inspected or controlled. You can switch to All Tabs mode anytime from the popup.Visual indicators: The Chrome toolbar badge shows
ONwhen connected,MCP(green) on attached tabs, andALLwhen All Tabs mode is active.Multi-client safe: Multiple MCP apps/windows running simultaneously share one local WebSocket bridge automatically via a leader/follower HTTP proxy on
127.0.0.1.Zero-build extension:
extension/is plain JavaScript/HTML/CSS ready for Load unpacked inchrome://extensions.
Related MCP server: Chrome MCP
Architecture
+-----------------------+
| Antigravity / Claude |
| Codex / Cursor |
+-----------+-----------+
| MCP (stdio)
v
+-----------------------+ HTTP /rpc (follower -> leader)
| chrome-control-mcp | <------------------------------------+
| (Node.js TypeScript) | |
+-----------+-----------+ |
| ws://127.0.0.1:19222/ws |
| Auth: 256-bit Bearer/query token |
| Origin check: chrome-extension://* only |
v |
+-----------------------+ |
| Chrome MV3 Extension | (existing Chrome profile + sessions) |
| - background.js | |
| - content.js (on-dem.)| |
| - popup UI | |
+-----------------------+Quick Start
1. Build the MCP server
Requires Node.js 22+ and Google Chrome (or any Chromium browser supporting Manifest V3).
git clone https://github.com/<your-username>/chrome-control-mcp.git
cd chrome-control-mcp
npm install
npm run buildWindows PowerShell note: If PowerShell blocks
npmdue to script execution policy, runnpm.cmd installandnpm.cmd run build(or run from Command Prompt / Git Bash).
2. Generate & print your local auth token
npm run token
# Windows PowerShell fallback: npm.cmd run token (or: node dist/index.js --print-token)This creates (or reads) a 256-bit hex secret in ~/.chrome-control-mcp/token (%USERPROFILE%\.chrome-control-mcp\token on Windows) and prints:
Token: <64-char-hex-token>
Token file: ...
WebSocket URL: ws://127.0.0.1:19222/ws3. Load the Chrome Extension
Open
chrome://extensionsin your regular Chrome browser.Turn on Developer mode (top-right toggle).
Click Load unpacked and select this repository's
extension/folder.Pin Chrome Control MCP to your Chrome toolbar.
Click the extension icon, paste your Auth Token (port defaults to
19222), and click Connect.Open a webpage you want to work with and click Attach Current Tab in the popup.
4. Add the MCP server to your AI client
Replace /absolute/path/to/chrome-control-mcp with the actual path on your machine.
Antigravity (mcp_config.json)
Open Manage MCP Servers → View raw config (or ~/.gemini/antigravity/mcp_config.json / .agents/mcp_config.json) and add:
{
"mcpServers": {
"chrome-control": {
"command": "node",
"args": ["/absolute/path/to/chrome-control-mcp/dist/index.js"]
}
}
}Windows example (mcp_config.json or claude_desktop_config.json):
{
"mcpServers": {
"chrome-control": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": ["C:\\Users\\you\\chrome-control-mcp\\dist\\index.js"]
}
}
}Claude Desktop (claude_desktop_config.json)
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Use the same "mcpServers" JSON block above.
Claude Code
claude mcp add --scope user chrome-control -- node /absolute/path/to/chrome-control-mcp/dist/index.jsCodex (~/.codex/config.toml / %USERPROFILE%\.codex\config.toml)
[mcp_servers.chrome-control]
command = "node"
args = ["/absolute/path/to/chrome-control-mcp/dist/index.js"]Cursor (.cursor/mcp.json or global MCP settings)
Use the same "mcpServers" JSON configuration as Antigravity / Claude Desktop.
Restart your MCP client, make sure the extension shows Connected, and ask: "Check browser_status and snapshot my attached tab."
Security Model & Scope
Loopback only: The local server binds strictly to
127.0.0.1(never0.0.0.0).256-bit secret token: Saved with
0600file mode and verified usingcrypto.timingSafeEqual.CSWSH protection: WebSocket upgrade requests that include an
Originheader are rejected with403 Forbiddenunless the origin begins withchrome-extension://. Any random webpage trying to connect tows://127.0.0.1:19222is blocked.Explicit tab consent: Defaults to
attached_onlymode so unattached personal tabs remain isolated until you attach them (or switch toall_tabs).Restricted browser URLs blocked: Internal pages (
chrome://,chrome-extension://,edge://,about:,devtools://, Chrome Web Store) cannot be scripted.Sanctioned APIs only: Built solely on documented Chrome Manifest V3 extension APIs (
tabs,scripting,storage,alarms,downloads). It does not spoof browser fingerprints or bypass CAPTCHAs, anti-bot checks, login walls, or platform quotas — complete any sign-in or verification challenge manually in Chrome.
MCP Tools Reference (17 Tools)
Tool | Purpose |
| Check extension connection, control mode, attached tab IDs, and local bridge config (plus setup steps when disconnected). |
| List open Chrome tabs with |
| Open a URL in a new Chrome tab (auto-attaches by default when |
| Activate a tab by |
| Close a controlled tab by |
| Navigate ( |
| Walk visible DOM and open Shadow DOM interactive elements, returning short refs ( |
| Click, double-click, right-click, or hover an element by snapshot |
| Type into |
| Send keyboard events ( |
| Select a |
| Scroll the page or a container ( |
| Wait for a selector or text to reach |
| Capture the visible tab ( |
| Read visible text or a specific HTML attribute from an element or the entire page. |
| Trigger a Chrome download using your browser session/cookies, list recent downloads, or check a download's status. |
| Read a local file (up to 25 MB) and attach it to an |
Configuration (Environment Variables)
Variable | Default | Purpose |
|
| Localhost WebSocket & follower HTTP port. |
|
| Directory storing the generated |
| (auto-generated) | Optional override token instead of reading |
Development & Testing
npm run build # Compile src/*.ts -> dist/*.js
npm test # Run extension syntax, bridge security/RPC, and end-to-end stdio MCP tests
npm run icons # Regenerate extension/icons/icon{16,48,128}.pngLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Maintenance
Related MCP Connectors
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Let AI agents observe and control Chrome tabs you explicitly share via Browse Bridge.
Let AI agents work in your own signed-in Chrome, with approvals and verified results.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to control and automate your Chrome browser directly, leveraging existing login states and configurations for tasks like content analysis, semantic search across tabs, screenshots, network monitoring, and interactive operations.13MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to control a live Google Chrome browser, allowing tab management, navigation, clicking, typing, screenshots, and JavaScript evaluation through the user's real profile.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to drive the user's real, already-logged-in Chrome browser locally, so they can read and navigate pages, click, type, fill forms, take screenshots, and inspect cookies, tabs, console, and network traffic without headless browsers or remote-debugging ports.1 npmISC
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control a user's real Chrome, Firefox, Edge, or Opera browser through a browser extension, reusing their existing logged-in sessions and extensions. It provides tools to navigate tabs, capture snapshots and screenshots, extract content, interact with elements, run JavaScript, and monitor network traffic, including same-origin iframe content and incognito tabs.Apache 2.0