chrome-devtools-mcp README

The project's README from github.com/ChromeDevTools/chrome-devtools-mcp. As one markdown file: README.md.

Chrome DevTools for agents

npm chrome-devtools-mcp package

Chrome DevTools for agents (chrome-devtools-mcp) lets your coding agent (such as Antigravity, Claude, Cursor or Copilot) control and inspect a live Chrome browser. It acts as a Model-Context-Protocol (MCP) server, giving your AI coding assistant access to the full power of Chrome DevTools for reliable automation, in-depth debugging, and performance analysis. A CLI is also provided for use without MCP.

Tool reference | Changelog | Contributing | Troubleshooting | Design Principles

Key features

Disclaimers

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.

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 own discretion. We are committed to providing fixes and support for the latest version of Extended Stable Chrome.

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.

Update checks

By default, the server periodically checks the npm registry for updates and logs a notification when a newer version is available. You can disable these update checks by setting the CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS environment variable.

Requirements

Getting started

Add the following config to your MCP client:

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

[!NOTE] Using chrome-devtools-mcp@latest ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.

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"]
    }
  }
}

See Slim tool reference.

MCP Client configuration

For setup instructions specific to your editor or agent (e.g. Antigravity, Claude Code, Cursor, VS Code), please see our Client Configurations Guide.

Your first prompt

Enter the following prompt in your MCP Client to check if everything is working:

Check the performance of https://developers.chrome.com

Your MCP client should open the browser and record a performance trace.

[!NOTE] The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Chrome DevTools MCP server on its own will not automatically start the browser.

Tools

If you run into any issues, checkout our troubleshooting guide. See the full Tool Reference for a complete list of all supported MCP capabilities.

Configuration

Find the complete list of server parameters (e.g., --headless, --isolated, --slim) and how to configure WebSocket connections in the Configuration Guide.

Advanced Usage

For advanced features such as handling concurrent sessions, persistent user data directories, connecting to a running Chrome instance instead of starting a new one, or debugging on Android, see our Advanced Usage Guide.

Integrating as a browser subagent

If you are developing agentic tooling and want to provide an integrated browser subagent as part of your product, we recommend building on top of Chrome DevTools for agents.

For a reference implementation, see the Gemini CLI browser agent documentation.

chrome-devtools-mcp (ChromeDevTools/chrome-devtools-mcp)

Searching Database…

这是什么?chrome-devtools-mcp 是一个 MCP 服务器,可以让 Claude、Cursor、Copilot 或 Antigravity 等编程智能体借助 Chrome DevTools 的全部功能,控制并检查正在运行的 Chrome 浏览器。
这是我要导入的库,还是独立的服务器?它是一个 MCP 服务器(另外还附带一个独立的命令行工具),由你的 MCP 客户端连接使用;它不是可以导入到应用代码中的库。
如何将它添加到我的 MCP 客户端?在你的 MCP 客户端配置中(Antigravity、Claude Code、Cursor、VS Code 等)按照 Client Configurations Guide 添加 chrome-devtools-mcp@latest 作为服务器条目,然后直接让智能体使用它即可。
运行之前需要安装什么?你需要 Node.js LTS 版本、当前稳定版(或更新版)的 Chrome 浏览器,以及 npm。
它能用于任何 Chromium 内核的浏览器,还是只能用于 Chrome?官方只支持 Google Chrome 和 Chrome for Testing;其他基于 Chromium 的浏览器可能也能运行,但不做保证。
连接之后,它实际能做什么?它可以录制性能追踪并提取可操作的洞察,分析网络请求,截取屏幕截图,读取控制台消息并提供经过源码映射的堆栈追踪,还能通过 Puppeteer 可靠地自动执行浏览器操作,并自动等待页面就绪。
如果我只需要基础的自动化,有更轻量的模式吗?有的,使用 --slim 参数运行即可启用精简工具集,用于基础的浏览器任务,详见 Slim Tool Reference。
它能连接到我已经打开的浏览器,而不是启动一个新的吗?可以,Advanced Usage Guide 介绍了如何连接到已经运行的 Chrome 实例、持久化用户数据目录、并发会话以及在 Android 上调试。
如何关闭遥测和更新检查?启动时传入 --no-performance-crux 和 --no-usage-statistics 参数,或设置环境变量 CHROMEDEVTOOLSMCPNOUPDATECHECKS 以停止版本检查通知;在 CI 环境中,数据收集也会自动关闭。
Size
21.6 MB
Stars
53.7K
Age
1y
Commits · 90 Days