chrome-devtools-mcp
ChromeDevTools · ChromeDevTools/chrome-devtools-mcp
MCP server này cho phép AI agent của bạn điều khiển và kiểm tra trình duyệt Chrome trực tiếp để tự động hóa, gỡ lỗi và phân tích hiệu suất.
Chrome DevTools cho tác nhân lập trình
Xem trước
Bạn có thể làm gì với nó
- Tự động hóa các hành động trình duyệt như điền form hoặc nhấp vào các phần tử từ agent của bạn.
- Gỡ lỗi ứng dụng web bằng cách kiểm tra các yêu cầu mạng và thông báo console thông qua agent.
- Thực hiện phân tích hiệu suất của các trang web để xác định các điểm nghẽn.
Thử hỏi agent của bạn
- “Mở example.com, điền dữ liệu giả vào biểu mẫu liên hệ và nhấp gửi.”
- “Điều hướng đến trang web của tôi, nắm bắt tất cả các yêu cầu mạng và báo cáo bất kỳ lỗi 4xx/5xx nào.”
- “Đo lường hiệu suất tải của trang đích trên thiết bị di động và cung cấp thông tin chi tiết.”
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Chrome DevTools for agents
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 is available as a
Model-Context-Protocol (MCP) server and as a [CLI][cli]. Both give your AI
coding assistant access to the full power of Chrome DevTools for reliable
automation, in-depth debugging, and performance analysis.
[Tool reference][tool-reference] | [CLI][cli] | [Skills][skills] | [Changelog][changelog] | [Contributing][contributing] | [Troubleshooting][troubleshooting] | [Design Principles][design-principles]
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
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@latestensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
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][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.
CLI
The package also includes the chrome-devtools CLI. Use it to control the browser from your terminal without MCP:
npm i chrome-devtools-mcp@latest -g
chrome-devtools navigate_page 1 --url "https://developers.chrome.com"
chrome-devtools take_screenshot 1 --filePath screenshot.png
chrome-devtools stop
See the [CLI guide][cli] for all commands and options.
Skills
The package includes skills that teach your agent how to use Chrome DevTools:
| Skill | Use it to |
|---|---|
chrome-devtools | Debug and automate pages with the MCP tools. |
chrome-devtools-cli | Run the CLI and write shell scripts with it. |
a11y-debugging | Audit and fix accessibility issues. |
cookie-debugging | Debug cookies, sessions, and authentication. |
debug-optimize-lcp | Debug and improve Largest Contentful Paint. |
memory-leak-debugging | Find and fix memory leaks. |
troubleshooting |