Chrome DevTools for coding agents

Control and inspect a live Chrome browser with your AI coding assistant

40,337
Stars
2,566
Forks
83
Issues
TypeScript
Language
Apache 2.0
License

Key features

Get performance insights

Uses Chrome DevTools to record traces and extract actionable performance insights.

Advanced browser debugging

Analyze network requests, take screenshots and check browser console messages (with source-mapped stack traces).

Reliable automation

Uses puppeteer to automate actions in Chrome and automatically wait for action results.

Disclaimers

Security

chrome-devtools-mcp exposes content of the browser instance to the MCP clients allowing them to inspect, debug, and modify any data in the browser or DevTools. Avoid sharing sensitive or personal information that you don't want to share with MCP clients.

Browser Support

chrome-devtools-mcp officially supports Google Chrome and Chrome for Testing only. Other Chromium-based browsers may work, but this is not guaranteed, and you may encounter unexpected behavior. Use at your discretion. We are committed to providing fixes and support for the latest version of Extended Stable Chrome.

Performance Tools

Performance tools may send trace URLs to the Google CrUX API to fetch real-user experience data. This helps provide a holistic performance picture by presenting field data alongside lab data. This data is collected by the Chrome User Experience Report (CrUX). To disable this, run with the --no-performance-crux flag.

Usage statistics

Google collects usage statistics (such as tool invocation success rates, latency, and environment information) to improve the reliability and performance of Chrome DevTools MCP.

Data collection is enabled by default. You can opt-out by passing the --no-usage-statistics flag when starting the server:

"args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics"]

Google handles this data in accordance with the Google Privacy Policy.

Google's collection of usage statistics for Chrome DevTools MCP is independent from the Chrome browser's usage statistics. Opting out of Chrome metrics does not automatically opt you out of this tool, and vice-versa.

Collection is disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set.

Getting started

Add the following config to your MCP client:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest"]
    }
  }
}

If you are interested in doing only basic browser tasks, use the --slim mode:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest", "--slim", "--headless"]
    }
  }
}

Supported MCP Clients

Amp
Antigravity
Claude Code
Cline
Codex
Command Code
Copilot CLI
Copilot / VS Code
Cursor
Factory CLI
Gemini CLI
Gemini Code Assist
JetBrains AI Assistant & Junie
Kiro
Katalon Studio
Mistral Vibe
OpenCode
Qoder
Qoder CLI
Visual Studio
Warp
Windsurf

Tools

Input automation (10 tools)

  • click
  • drag
  • fill
  • fill_form
  • handle_dialog
  • hover
  • press_key
  • type_text
  • upload_file
  • click_at

Navigation automation (6 tools)

  • close_page
  • list_pages
  • navigate_page
  • new_page
  • select_page
  • wait_for

Emulation (2 tools)

  • emulate
  • resize_page

Performance (3 tools)

  • performance_analyze_insight
  • performance_start_trace
  • performance_stop_trace

Network (2 tools)

  • get_network_request
  • list_network_requests

Debugging (8 tools)

  • evaluate_script
  • get_console_message
  • lighthouse_audit
  • list_console_messages
  • take_screenshot
  • take_snapshot
  • screencast_start
  • screencast_stop

Memory (5 tools)

  • take_heapsnapshot
  • get_heapsnapshot_class_nodes
  • get_heapsnapshot_details
  • get_heapsnapshot_retainers
  • get_heapsnapshot_summary

Extensions (5 tools)

  • install_extension
  • list_extensions
  • reload_extension
  • trigger_extension_action
  • uninstall_extension

Third-party (2 tools)

  • execute_3p_developer_tool
  • list_3p_developer_tools

WebMCP (2 tools)

  • execute_webmcp_tool
  • list_webmcp_tools

Configuration

The Chrome DevTools MCP server supports the following configuration option:

--autoConnect Type: boolean Default: false
--browserUrl Type: string Default: undefined
--wsEndpoint Type: string Default: undefined
--wsHeaders Type: string Default: undefined
--headless Type: boolean Default: false
--executablePath Type: string Default: undefined
--isolated Type: boolean Default: false
--userDataDir Type: string Default: $HOME/.cache/chrome-devtools-mcp/chrome-profile$CHANNEL_SUFFIX_IF_NON_STABLE
--channel Type: string Default: stable
--logFile Type: string Default: undefined
--viewport Type: string Default: undefined
--proxyServer Type: string Default: undefined
--acceptInsecureCerts Type: boolean Default: false
--experimentalPageIdRouting Type: boolean Default: false
--experimentalDevtools Type: boolean Default: false
--experimentalVision Type: boolean Default: false
--experimentalMemory Type: boolean Default: false
--experimentalStructuredContent Type: boolean Default: false
--experimentalIncludeAllPages Type: boolean Default: false
--experimentalScreencast Type: boolean Default: false

Pass them via the args property in the JSON configuration:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--channel=canary",
        "--headless=true",
        "--isolated=true"
      ]
    }
  }
}

Connecting via WebSocket with custom headers:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/",
        "--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}"
      ]
    }
  }
}

Concepts

Concurrent sessions

Most MCP clients start one Chrome DevTools MCP server per conversation. If your client shares a single server instance across concurrent agents or subagents, start the server with --experimentalPageIdRouting.

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp@latest",
        "--experimentalPageIdRouting"
      ]
    }
  }
}

User data directory

chrome-devtools-mcp starts a Chrome's stable channel instance using the following user data directory:

  • Linux / macOS: $HOME/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL
  • Windows: %HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL

The user data directory is not cleared between runs and shared across all instances of chrome-devtools-mcp. Set the isolated option to true to use a temporary user data dir instead which will be cleared automatically after the browser is closed.

Connecting to a running Chrome instance

By default, the Chrome DevTools MCP server will start a new Chrome instance with a dedicated profile. This might not be ideal in all situations. There are two ways to connect to a running Chrome instance:

  • Automatic connection (available in Chrome 144)
  • Manual connection via remote debugging port

Automatically connecting to a running Chrome instance

Step 1: Set up remote debugging in Chrome. Navigate to chrome://inspect/#remote-debugging to enable remote debugging. Follow the dialog UI to allow or disallow incoming debugging connections.

Step 2: Configure Chrome DevTools MCP server to automatically connect to a running Chrome Instance:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["chrome-devtools-mcp@latest", "--autoConnect"]
    }
  }
}

Step 3: Test your setup by running a prompt in your MCP client.

Manual connection using port forwarding

Step 1: Configure the MCP client:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--browser-url=http://127.0.0.1:9222"
      ]
    }
  }
}

Step 2: Start the Chrome browser with the remote debugging port enabled.

Step 3: Test your setup by running a prompt in your MCP client.