home / mcp / chrome tools mcp server
Provides tools to interact with Chrome via DevTools Protocol for remote control, scripting, and inspection.
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.
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.
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"
}
}
}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.
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.
Available capabilities include listing tabs, loading URLs, executing scripts, capturing screenshots, monitoring network events, querying DOM elements, and clicking elements with console output capture.
Lists all available Chrome tabs.
Executes JavaScript code in a specified tab.
Captures a screenshot of a specified tab with optimized image processing for AI consumption.
Monitors and captures network events from a specified tab.
Navigates a tab to a specified URL.
Queries and returns detailed information about DOM elements matching a CSS selector.
Clicks a DOM element and captures console output triggered by the click.