Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

chrome-mcp

MCP.Pizza Chef: lxe

chrome-mcp is an MCP server enabling LLM agents to interact with a local Chrome browser instance using the Chrome DevTools Protocol. It provides fine-grained control over browser actions without relying on screenshots, facilitating real-time, structured browser context and interaction. It requires Chrome with remote debugging enabled and supports Bun or Node.js environments for setup and operation.

Use This MCP server To

Automate browser navigation and interaction via LLM commands Extract structured web page data without screenshots Control Chrome tabs and sessions programmatically Enable real-time web context feeding to LLMs Run multi-step web automation workflows with LLMs Debug and inspect web pages through MCP integration Integrate browser control into AI-enhanced workflows

README

Chrome MCP Server

A Model Context Protocol (MCP) server that provides fine-grained control over a Chrome browser instance through the Chrome DevTools Protocol (CDP).

Prerequisites

  • Bun (recommended) or Node.js (v14 or higher)
  • Chrome browser with remote debugging enabled

Setup

Installing Bun

  1. Install Bun (if not already installed):
# 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
  1. Start Chrome with remote debugging enabled:

    # 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
  2. Install dependencies:

bun install
  1. Start the server:
bun start

For development with hot reloading:

bun dev

The server will start on port 3000 by default. You can change this by setting the PORT environment variable.

Configuring Roo Code to use this MCP server

To use this Chrome MCP server with Roo Code:

  1. Open Roo Code settings

  2. Navigate to the MCP settings configuration file at:

    • macOS: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
    • Windows: %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
    • Linux: ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
  3. Add the following configuration to the mcpServers object:

{
  "mcpServers": {
    "chrome-control": {
      "url": "http://localhost:3000/sse",
      "disabled": false,
      "alwaysAllow": []
    }
  }
}
  1. Save the file and restart Roo Code to apply the changes.

  2. You can now use the Chrome MCP tools in Roo Code to control the browser.

Available Tools

The server provides the following tools for browser control:

navigate

Navigate to a specific URL.

Parameters:

  • url (string): The URL to navigate to

click

Click at specific coordinates.

Parameters:

  • x (number): X coordinate
  • y (number): Y coordinate

type

Type text at the current focus.

Parameters:

  • text (string): Text to type

clickElement

Click on an element by its index in the page info.

Parameters:

  • selector (string): Element index (e.g., "0" for the first element)

getText

Get text content of an element using a CSS selector.

Parameters:

  • selector (string): CSS selector to find the element

getPageInfo

Get semantic information about the page including interactive elements and text nodes.

getPageState

Get current page state including URL, title, scroll position, and viewport size.

Usage

The server implements the Model Context Protocol with SSE transport. Connect to the server at:

  • SSE endpoint: http://localhost:3000/sse
  • Messages endpoint: http://localhost:3000/message?sessionId=...

When using with Roo Code, the configuration in the MCP settings file will handle the connection automatically.

Development

To run the server in development mode with hot reloading:

bun dev

This uses Bun's built-in watch mode to automatically restart the server when files change.

License

MIT

chrome-mcp FAQ

How do I enable remote debugging in Chrome for chrome-mcp?
Start Chrome with the --remote-debugging-port=9222 flag on your OS to allow chrome-mcp to connect.
What runtime environments does chrome-mcp support?
chrome-mcp supports Bun (recommended) and Node.js v14 or higher for running the server.
Can chrome-mcp control multiple Chrome tabs or windows?
Yes, it provides fine-grained control over multiple tabs and browser sessions via the DevTools Protocol.
Does chrome-mcp require screenshots to interact with the browser?
No, it uses the Chrome DevTools Protocol to control and read browser state without screenshots.
Is chrome-mcp compatible with all Chromium-based browsers?
It is designed for Chrome with remote debugging enabled; compatibility with other Chromium browsers may vary.
How does chrome-mcp improve LLM agent web interactions?
It provides structured, real-time browser context and control, enabling more precise and efficient LLM-driven web tasks.
Can I use chrome-mcp for automated testing or scraping?
Yes, it can be used to automate browser tasks, data extraction, and testing workflows via LLM orchestration.
How do I install dependencies for chrome-mcp?
Use Bun or npm to install dependencies, then start the server with the provided commands.