Chrome browser control via Model Context Protocol (MCP) - control your browser from AI coding assistants
npm install @yuval1024/chrome-mcpControl your Chrome browser from AI coding assistants using the Model Context Protocol (MCP).
- 🌐 Control browser tabs remotely
- 📸 Take screenshots
- 🔍 Get tab information
- 🚀 Navigate tabs
- 🎯 Create and close tabs
- 🔒 Secure connection using browser UUID
``bash`
npm install -g @yuval1024/chrome-mcpor use directly with npx
npx @yuval1024/chrome-mcp
1. Download the Chrome extension from releases
2. Load it in Chrome as an unpacked extension
3. Copy your Browser Secret (UUID) from the extension popup
`bash`
claude mcp add chrome-browser -- npx @yuval1024/chrome-mcp
Or add manually to your .claude.json:
`json`
{
"mcpServers": {
"chrome-browser": {
"type": "stdio",
"command": "npx",
"args": ["@yuval1024/chrome-mcp"]
}
}
}
In your Claude Code conversation, connect to your browser:
`javascript`
// Use the connectToBrowser tool with your browser UUID
connectToBrowser("your-browser-uuid-here")
The UUID is displayed in the Chrome extension popup. Keep it secret!
Once connected, you can use these tools in Claude Code:
- connectToBrowser(browserSecret) - Connect to your browsergetAllTabs()
- - Get information about all open tabsgetCurrentUrl()
- - Get the URL of the active tabtakeScreenshot({ tabId })
- - Capture a screenshotnavigateTab({ tabId, url })
- - Navigate to a URLcreateTab({ url, windowId })
- - Create a new tabcloseTab({ tabId })
- - Close a tabgetConsoleLogs({ tabId })
- - Get console logsgetDOMSnapshot({ tabId })
- - Get DOM structure
- Your browser UUID acts as a password - keep it secret!
- Each browser instance has a unique UUID
- No additional authentication required
- Communication happens through a secure polling mechanism
`bash
npx @yuval1024/chrome-mcp [options]
Options:
-s, --server
--debug Enable debug logging
--version Show version
--help Show help
`
1. Make sure the Chrome extension is installed and running
2. Check the extension popup shows "Connected" status
3. Verify the server URL matches in both extension and CLI
1. Make sure you've added the MCP server to Claude Code
2. Run connectToBrowser("your-uuid")` with the correct UUID
3. Check Claude Code logs for connection errors
MIT