logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

chromium-mcp-controller

Programmatically manipulate a Google Chrome or Chromium browser instance, enabling navigation, element interaction, and data extraction to enhance automated workflows.

Author

chromium-mcp-controller logo

lxe

No License

Quick Info

GitHub GitHub Stars 42
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

chromebrowserautomationbrowser automationlxe chromeautomation web

Chrome MCP Server Implementation Details

This repository furnishes a Model Context Protocol (MCP) server engineered to furnish precise, granular orchestration of a running Chrome browser session utilizing the Chrome DevTools Protocol (CDP).

Essential Dependencies

  • Bun (Strongly recommended runtime) OR Node.js (version 14 or later).
  • A functional installation of the Chrome browser configured to allow remote debugging.

Deployment Sequence

Installing Bun Runtime

  1. If Bun is absent, execute the following installation command: ```bash # For Unix-like systems (macOS, Linux, WSL) curl -fsSL https://bun.sh/install | bash

    For Windows (using PowerShell)

    powershell -c "irm bun.sh/install.ps1 | iex"

    Alternative installation path via npm

    npm install -g bun ```

  2. Initiate Chrome, ensuring the remote debugging interface is active:

    ```bash

    macOS Path

    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

    Windows Command

    start chrome --remote-debugging-port=9222

    Linux Command

    google-chrome --remote-debugging-port=9222 ```

  3. Fetch requisite project modules: bash bun install

  4. Launch the server application: bash bun start

To facilitate iterative development with immediate reflection of code changes: bash bun dev

By default, the communication endpoint listens on TCP port 3000. This port assignment can be overridden via the PORT environment variable.

Configuring Roo Code Integration

To integrate this Chrome control mechanism with the Roo Code IDE:

  1. Access the Roo Code user settings interface.
  2. Locate the designated configuration file for MCP server specifications:

    • 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. Inject the subsequent configuration block into the mcpServers section of the file:

{
  "mcpServers": {
    "chrome-control": {
      "url": "http://localhost:3000/sse",
      "disabled": false,
      "alwaysAllow": []
    }
  }
}
  1. Persist the modification and restart Roo Code to instantiate the setup.

  2. The integrated Chrome MCP functionalities will now be accessible within Roo Code.

Exposed Automation Capabilities

The server exposes the following primitives for browser manipulation:

Instructs the browser to load a specified Uniform Resource Locator.

Parameters: * url (string): The target web address.

click

Initiates a simulated mouse click at absolute screen coordinates.

Parameters: * x (number): Horizontal coordinate. * y (number): Vertical coordinate.

type

Simulates keyboard input directed at the currently focused interactive field.

Parameters: * text (string): The sequence of characters to input.

clickElement

Triggers a click event on an element identified by its internal index mapping.

Parameters: * selector (string): Element index reference (e.g., "0" for the first discovered interactive component).

getText

Retrieves the textual content from an element identified via a standard CSS selector.

Parameters: * selector (string): The CSS path used to locate the target element.

getPageInfo

Fetches comprehensive semantic structure of the current document, detailing interactable elements and textual data.

getPageState

Retrieves the current operational metrics of the viewport, including the URL, document title, scroll offset, and window dimensions.

Connectivity Reference

The system adheres to the Model Context Protocol utilizing Server-Sent Events (SSE) for bidirectional communication. Engage with the server via these endpoints: * SSE Subscription: http://localhost:3000/sse * Message Relay: http://localhost:3000/message?sessionId=...

When deployed alongside Roo Code, the connection handshake is automatically managed through the prior configuration step.

Development Loop

To initiate the server within a development environment featuring automatic code reloading: bash bun dev

This leverages Bun's native file-watching utility to ensure the server process automatically restarts upon any source code alteration.

Licensed under the MIT License.

See Also

`