Chrome DevTools MCP

io.github.ChromeDevTools由 GitHub 帳號 ChromeDevTools 發布v1.12.0更新於 Oct 29, 2026

MCP server for Chrome DevTools

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,讓編碼助理控制並檢視執行中的 Chrome 瀏覽器,用於自動化、除錯與效能分析。

可以做什麼
  • 導覽、開啟、選取、調整大小與關閉頁面,並等待指定文字出現
  • 點擊、懸停、拖曳、輸入、按鍵、填寫表單、上傳檔案與處理對話框
  • 取得無障礙樹快照、螢幕截圖與錄影,並讀取元素符合的 CSS 樣式
  • 檢視主控台訊息與網路請求,並在頁面中執行 JavaScript
  • 錄製效能追蹤、分析效能洞察、執行 Lighthouse 稽核並擷取堆積快照
適用情境
適合需要讓助理操作真實 Chrome 工作階段的場合:重現與除錯前端問題、檢查主控台與網路行為、稽核無障礙或 SEO,或量測載入效能與 Core Web Vitals。
執行需求
透過 npx 從 npm 套件 chrome-devtools-mcp 以 stdio 在本機執行。需要 Node.js LTS、npm 與目前穩定版 Chrome(或 Chrome for Testing);首次呼叫需要瀏覽器的工具時會自動啟動瀏覽器。未宣告帳號、API 金鑰或標頭。
安裝前請注意
此伺服器會把瀏覽器內容暴露給 MCP 用戶端,用戶端可檢視、除錯並修改瀏覽器中的任何資料,請避免涉及敏感或個人資訊。它能在頁面上點擊、輸入、上傳檔案並執行 JavaScript。預設會蒐集使用統計,可用 --no-usage-statistics 參數或 CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS 變數關閉;效能工具可能將追蹤 URL 傳送至 Google CrUX API,除非設定 --no-performance-crux。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Chrome DevTools MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

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 is available as a Model-Context-Protocol (MCP) server and as a 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 | CLI | Skills | Changelog | Contributing | Troubleshooting | 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:

json
"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:

json
{  "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.

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.

CLI

The package also includes the chrome-devtools CLI. Use it to control the browser from your terminal without MCP:

sh
npm i chrome-devtools-mcp@latest -gchrome-devtools navigate_page 1 --url "https://developers.chrome.com"chrome-devtools take_screenshot 1 --filePath screenshot.pngchrome-devtools stop

See the CLI guide for all commands and options.

Skills

The package includes skills that teach your agent how to use Chrome DevTools:

SkillUse it to
chrome-devtoolsDebug and automate pages with the MCP tools.
chrome-devtools-cliRun the CLI and write shell scripts with it.
a11y-debuggingAudit and fix accessibility issues.
cookie-debuggingDebug cookies, sessions, and authentication.
debug-optimize-lcpDebug and improve Largest Contentful Paint.
memory-leak-debuggingFind and fix memory leaks.
troubleshootingFix connection problems between MCP and Chrome.

Install skills as a plugin

A plugin installs the MCP server and all skills, including the CLI skill:

  • Claude Code: Run /plugin marketplace add ChromeDevTools/chrome-devtools-mcp, then /plugin install chrome-devtools-mcp@chrome-devtools-plugins.
  • Copilot / VS Code: Run Chat: Install Plugin From Source and enter ChromeDevTools/chrome-devtools-mcp.
  • Gemini CLI: Run gemini extensions install --auto-update https://github.com/ChromeDevTools/chrome-devtools-mcp.

See the Client Configurations Guide for more information.

Install skills manually

If your agent does not support plugins, copy the skill folders into the skills directory of your agent. The npm package contains the skills:

sh
npm i chrome-devtools-mcp@latest -g# Example for Claude Code. Use the skills directory of your agent.mkdir -p ~/.claude/skillscp -R "$(npm root -g)/chrome-devtools-mcp/skills/chrome-devtools-cli" ~/.claude/skills/

[!IMPORTANT] The chrome-devtools-cli skill requires the CLI. Install the package globally before you use the skill.

Keep skills up to date

Skills describe the tools of a specific version. Update the skills each time you update the MCP server or the CLI. Outdated skills can tell your agent to use tools or parameters that changed.

  • Plugins: Use the update command of the plugin manager of your agent. The Gemini CLI command above enables automatic updates with --auto-update.
  • Manual installs: Update the package, then copy the skill folders again:
sh
npm i chrome-devtools-mcp@latest -gmkdir -p ~/.claude/skillscp -R "$(npm root -g)/chrome-devtools-mcp/skills/chrome-devtools-cli" ~/.claude/skills/

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.

For basic browser tasks only, the --slim flag exposes a reduced set of tools. See the Slim tool reference.

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.

來源:README.md,提交 af28344

工具

32

click

Clicks on the provided element

輸入參數uid必填pageId必填dblClickincludeSnapshot

close_page

Closes the page by its index. The last open page cannot be closed.

輸入參數pageId必填

drag

Drag an element onto another element

輸入參數pageId必填to_uid必填from_uid必填includeSnapshot

emulate

Emulates various features on the target page. Each call replaces all emulation settings (except extraHttpHeaders), so pass all desired settings in a single call.

輸入參數pageId必填viewportuserAgentcolorSchemegeolocationforcedColorsprefersContrastextraHttpHeaderscpuThrottlingRatenetworkConditionsprefersReducedMotion

evaluate_script

Evaluate JavaScript inside the target page. The source can be provided inline or loaded from a local file. Returns the response as JSON, so returned values have to be JSON-serializable.

輸入參數argsformatpageId必填filePathfunctionsourcePathdialogActionwaitForStableDom

fill

Type text into an input, text area or select an option from a <select> element.

輸入參數uid必填value必填pageId必填includeSnapshot

fill_form

Fill out multiple form elements (inputs, selects, checkboxes, radios) at once. ALWAYS prefer this tool over multiple individual 'fill' or 'click' calls when interacting with forms. It is significantly faster, more reliable, and reduces turn count. Example: Fill username, password, and check "Remember Me" in one call.

輸入參數pageId必填elements必填includeSnapshot

get_console_message

Gets a console message by its ID. You can get all messages by calling list_console_messages.

輸入參數msgid必填pageId必填

get_css_styles

Retrieve matched CSS rules, inline styles (element.style), inherited styles, custom properties, and cascade wrappers (@layer, @media, @container, @scope) for an element identified by its UID. Rules are ordered from highest to lowest cascade precedence and include source line numbers (e.g. index:196). Active (winning) declarations have no prefix tag, while (losing) overridden declarations are prefixed with [overloaded]. Treat the output as authoritative and complete. Results are paginated (10 rules per page by default); use pageIdx to page through the remaining rules. Requires a UID from take_snapshot.

輸入參數uid必填pageId必填pageIdxpageSize

get_network_request

Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel. Useful for inspecting request headers (including 'Cookie') and response headers (including 'Set-Cookie' and directives).

輸入參數reqidpageId必填requestFilePathresponseFilePath

handle_dialog

If a browser dialog was opened, use this command to handle it

輸入參數action必填pageId必填promptText

hover

Hover over the provided element

輸入參數uid必填pageId必填includeSnapshot

lighthouse_audit

Get Lighthouse scores, failing audits, and the DOM nodes they flag for accessibility, SEO, best practices, and agentic browsing. Full reports are saved to disk. This excludes performance. For performance audits, run performance_start_trace

輸入參數modedevicepageId必填outputDirPath

list_console_messages

List all console messages for the target page since the last navigation.

輸入參數typespageId必填pageIdxpageSizeserviceWorkerIdincludeStackTracesincludePreservedMessages

list_network_requests

Lists the most recent requests for the target page since the last navigation.

輸入參數pageId必填pageIdxpageSizeresourceTypesincludePreservedRequests

list_pages

Get a list of pages open in the browser.

無需輸入參數。

navigate_page

Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.

輸入參數urltypepageId必填timeoutinitScriptignoreCachehandleBeforeUnload

new_page

Open a new tab and load a URL. Use project URL if not specified otherwise.

輸入參數url必填timeoutbackgroundisolatedContext

performance_analyze_insight

Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.

輸入參數pageId必填insightName必填insightSetId必填

performance_start_trace

Start a performance trace on the target webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.

輸入參數pageId必填reloadautoStopfilePathignoreCache

performance_stop_trace

Stop the active performance trace recording on the target webpage.

輸入參數pageId必填filePath

press_key

Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).

輸入參數key必填pageId必填includeSnapshot

resize_page

Resizes the page's window so that the page has specified dimension

輸入參數width必填height必填pageId必填

screencast_start

Starts recording a screencast (video) of the target page.

輸入參數pageId必填filePath

screencast_stop

Stops the active screencast recording on the target page.

輸入參數pageId必填

select_page

Select a page as a context for future tool calls.

輸入參數pageId必填bringToFront

take_heapsnapshot

Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.

輸入參數pageId必填filePath必填

take_screenshot

Take a screenshot of the page or element.

輸入參數uidformatpageId必填qualityfilePathfullPage

take_snapshot

Take a text snapshot of the target page based on the a11y tree. The snapshot lists page elements along with a unique identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected in the DevTools Elements panel (if any).

輸入參數pageId必填verbosefilePath

type_text

Type text using keyboard into a previously focused input

輸入參數text必填pageId必填submitKey

upload_file

Upload a file through a provided element.

輸入參數uid必填pageId必填filePaths必填includeSnapshot

wait_for

Wait for the specified text to appear on the selected page. By default, hidden text is also matched. Set visible to true to wait until the matched text is visible.

輸入參數text必填pageId必填timeoutvisible

版本歷史

4
  1. v1.12.0最新Oct 22, 2026
  2. v1.11.0Oct 15, 2026
  3. v1.10.1Sep 23, 2026
  4. v1.9.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分