Get the FREE Ultimate OpenClaw Setup Guide →

chrome-devtools

An MCP Server for Chrome DevTools, following the Chrome DevTools Protocol. Integrates with Claude Desktop and Claude Code.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio benjaminr-chrome-devtools-mcp python /absolute/path/to/chrome-devtools-mcp/server.py \
  --env CHROME_DEBUG_PORT="9222"

How to use

This MCP server provides a bridge between Claude's MCP tooling and the Chrome DevTools Protocol. Once installed and running, you can connect Claude to a Chrome instance, inspect network activity, read and debug console output, and inspect or execute code in the browser context. The server exposes tools such as network request viewing, console error summaries, and object inspection, enabling natural-language control over browser debugging tasks. Common workflow involves starting or attaching to a Chrome session with remote debugging enabled, then issuing MCP commands to fetch network data, inspect console output, or navigate and interact with the page in real time.

Key MCP tools available with this server include: get_network_requests(filter_domain?, filter_status?, limit?) to capture HTTP traffic; get_network_response(request_id) to fetch details about a specific request; get_console_error_summary() to analyze JavaScript errors; and inspect_console_object("window") (or other objects) to inspect JavaScript state. Other Chrome management commands such as start_chrome(port?, url?, headless?, chrome_path?, auto_connect?), navigate_to_url(url), and connect_to_browser(port?) enable end-to-end control of the browsing session from Claude.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Internet access to install dependencies
  • Optional: uv (for Claude Code workflow) or a local MCP installation via the Python MCP SDK

Installation steps (Option A - Claude Desktop / MCP CLI):

  1. Clone the repository: git clone https://github.com/benjaminr/chrome-devtools-mcp.git cd chrome-devtools-mcp
  2. Install dependencies and set up the MCP server: mcp install server.py -n "Chrome DevTools MCP" --with-editable . Note: The mcp tool is part of the Python MCP SDK. Install it with pip install mcp if not available.
  3. Run or register the server in Claude Desktop or your MCP client, using an absolute path to the server: For Claude Desktop: point to /absolute/path/to/chrome-devtools-mcp/server.py and set CHROME_DEBUG_PORT=9222 in env.

Installation steps (Option B - Manual Claude Desktop Setup):

  1. Clone the repo and install dependencies (uv or pip): uv sync # optional, creates virtual environment

    or

    pip install -r requirements.txt
  2. Add to Claude Desktop configuration with absolute paths: { "mcpServers": { "chrome-devtools": { "command": "python", "args": ["/absolute/path/to/chrome-devtools-mcp/server.py"], "env": { "CHROME_DEBUG_PORT": "9222" } } } }
  3. Restart Claude Desktop and verify the server appears in the MCP tools.

Additional notes

Environment variable CHROME_DEBUG_PORT should match the port Chrome uses for remote debugging (default 9222). If you encounter module or path errors, ensure you’re using absolute paths to server.py and that dependencies are installed in the same Python environment. For Claude Code users, the uv workflow creates a virtual environment that should be used to run server.py. If Chrome cannot be found automatically, specify chrome_path in the start_chrome_startup commands. The pre-built Claude Desktop extension (.dxt) option is available for one-click installation and includes all dependencies.

Related MCP Servers

Sponsor this space

Reach thousands of developers