home / mcp / chrome mcp server

Chrome MCP Server

Allows LLM agents to control a local chrome instance without taking screenshots

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "lxe-chrome-mcp": {
      "url": "http://localhost:3000/sse"
    }
  }
}

This MCP server lets you control a Chrome browser instance remotely through the Chrome DevTools Protocol, giving you fine-grained browser automation capabilities from an MCP client. It’s useful for automated testing, UI automation, and headless browser tasks where you want programmatic control over navigation, input, and state.

How to use

Connect to the Chrome MCP Server from your MCP client to send actions that drive a Chrome browser. The server speaks the Model Context Protocol (MCP) over SSE, with a dedicated SSE endpoint you connect to. Typical workflows include navigating to URLs, clicking at coordinates, typing text, interacting with elements, and inspecting page information and state.

To start using it, ensure Chrome is running with remote debugging enabled on port 9222 and that the MCP server is running. Use the HTTP configuration endpoint to connect your MCP client. The server exposes the SSE channel at the address you specify, and your client will exchange events and commands through that channel.

Common usage pattern with an MCP client is to establish a session, perform a sequence of actions (navigate, click, type, etc.), and then query page state or page info as needed. The server provides tools for navigation, input, element interaction, and retrieval of page information and state to drive your automation scenarios.

How to install

Prerequisites: You need Bun (recommended) or Node.js v14 or higher, and Chrome with remote debugging enabled.

# Bun install (preferred)
# macOS, Linux, or WSL
curl -fsSL https://bun.sh/install | bash

# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"

# Alternatively, using npm
npm install -g bun

Start Chrome with remote debugging enabled on port 9222, then proceed to install dependencies and run the server.

# 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
bun install
bun start
# For development with hot reloading
bun dev

Additional setup and configuration

Configure your MCP client (Roo Code) to connect to this server. The MCP endpoint is exposed via an SSE URL at the server’s base, typically http://localhost:3000/sse. If you are enabling a local development workflow, run the server and point your client to that address.

Example client configuration (local), to be added to your MCP settings under mcpServers. The configuration uses an HTTP connection to the server’s SSE endpoint.

{
  "mcpServers": {
    "chrome_control": {
      "url": "http://localhost:3000/sse",
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Available tools

navigate

Navigate the browser to a specified URL by sending a navigate command with the target URL.

click

Click at given screen coordinates by providing x and y values to simulate a mouse click on the page.

type

Type text into the currently focused element or input field, sending the specified text string.

clickElement

Click an element by its index as identified from the page’s element list or page info.

getText

Extract text content from an element selected by a CSS selector.

getPageInfo

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

getPageState

Return current page state such as URL, title, scroll position, and viewport size.