home / mcp / chrome tools mcp server

Chrome Tools MCP Server

Provides tools to interact with Chrome via DevTools Protocol for remote control, scripting, and inspection.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nicholmikey-chrome-tools-mcp": {
      "command": "node",
      "args": [
        "path/to/chrome-tools/dist/index.js"
      ],
      "env": {
        "CHROME_DEBUG_URL": "http://localhost:9222",
        "CHROME_ERROR_HELP": "custom error message",
        "CHROME_CONNECTION_TYPE": "direct"
      }
    }
  }
}

You run an MCP server that exposes Chrome DevTools interactions so you can remotely control Chrome tabs, execute JavaScript, capture screenshots, monitor network events, and more. This enables you to prepare Chrome in a desired state for AI-assisted workflows and to pull browser activity into your tooling.

How to use

Connect your MCP client to the Chrome Tools MCP Server to start sending commands. You can list tabs, navigate a tab to a URL, execute JavaScript in a tab, capture screenshots, monitor network events, query DOM elements, and click elements while capturing console output. Use the provided tool endpoints to perform these actions in the context of an active Chrome session.

Typical usage patterns include preparing a tab by navigating to a target URL, inspecting or manipulating the DOM, and collecting results or logs for your AI tooling. Each tool returns structured data, such as DOM element details or console messages, to help your automation flow.

How to install

Prerequisites: ensure Node.js and npm are installed on your system.

Install the Chrome Tools MCP package locally for your project.

Run the MCP server using the stdio configuration shown below. This starts the server process that interfaces with Chrome via its remote debugging protocol.

{
  "chrome-tools": {
    "command": "node",
    "args": ["path/to/chrome-tools/dist/index.js"],
    "env": {
      "CHROME_DEBUG_URL": "http://localhost:9222",
      "CHROME_CONNECTION_TYPE": "direct",
      "CHROME_ERROR_HELP": "custom error message"
    }
  }
}

Configuration and usage notes

Environment variables control how the server connects to Chrome and how errors are described. Set these in your MCP settings or environment before starting the server.

CHROME_DEBUG_URL: The URL where Chrome's remote debugging interface is available. Default is http://localhost:9222.

CHROME_CONNECTION_TYPE: Identifier for logging connection type. Examples include direct, ssh-tunnel, and docker.

CHROME_ERROR_HELP: Custom guidance shown when a connection fails.

Example MCP configuration for the server is shown here exactly as you would place it in your MCP settings.

Troubleshooting

If you cannot reach the remote debugging endpoint, verify that Chrome is running with remote debugging enabled on the configured port.

Ensure the environment variables are set in the same context where the MCP server process runs.

About tooling and capabilities

Available capabilities include listing tabs, loading URLs, executing scripts, capturing screenshots, monitoring network events, querying DOM elements, and clicking elements with console output capture.

Available tools

list_tabs

Lists all available Chrome tabs.

execute_script

Executes JavaScript code in a specified tab.

capture_screenshot

Captures a screenshot of a specified tab with optimized image processing for AI consumption.

capture_network_events

Monitors and captures network events from a specified tab.

load_url

Navigates a tab to a specified URL.

query_dom_elements

Queries and returns detailed information about DOM elements matching a CSS selector.

click_element

Clicks a DOM element and captures console output triggered by the click.

Chrome Tools MCP Server - nicholmikey/chrome-tools-mcp