The Chrome MCP server enables fine-grained control over a Chrome browser instance through the Chrome DevTools Protocol (CDP), implementing the Model Context Protocol (MCP) to allow tools like Roo Code to interact with the browser programmatically.
# macOS, Linux, or WSL
curl -fsSL https://bun.sh/install | bash
# Windows (using PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
# Alternatively, using npm
npm install -g bun
You can use the included script which automatically detects your OS:
# Make the script executable
chmod +x start-chrome.sh
# Run the script
./start-chrome.sh
Or manually start Chrome with remote debugging:
# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
# Windows
start chrome --remote-debugging-port=9222
# Linux
google-chrome --remote-debugging-port=9222
# Install dependencies
bun install
# Start the server
bun start
The server runs on port 3000 by default. You can change this by setting the PORT environment variable.
To use this Chrome MCP server with Roo Code:
Open Roo Code settings
Navigate to the MCP settings configuration file at:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
Add the following configuration to the mcpServers object:
{
"mcpServers": {
"chrome-control": {
"url": "http://localhost:3000/sse-cursor",
"disabled": false,
"alwaysAllow": []
}
}
}
The server provides several tools for controlling the browser:
Navigate to a specific URL.
Parameters:
Click at specific coordinates.
Parameters:
Type text at the current focus.
Parameters:
Click on an element by its index in the page info.
Parameters:
Get text content of an element using a CSS selector.
Parameters:
Get semantic information about the page including interactive elements and text nodes.
Get current page state including URL, title, scroll position, and viewport size.
The server implements the Model Context Protocol with SSE transport. Connect to:
When using with Roo Code, the configuration in the MCP settings file handles the connection automatically.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.