click
Clicks on the provided element
uid必填pageId必填dblClickincludeSnapshot
io.github.ChromeDevTools由 GitHub 帳號 ChromeDevTools 發布v1.12.0更新於 Oct 29, 2026
MCP server for Chrome DevTools
本機 MCP 伺服器,讓編碼助理控制並檢視執行中的 Chrome 瀏覽器,用於自動化、除錯與效能分析。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
[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
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.
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:
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.
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.
Add the following config to your MCP client:
[!NOTE] Using
chrome-devtools-mcp@latestensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
For setup instructions specific to your editor or agent (e.g. Antigravity, Claude Code, Cursor, VS Code), please see our Client Configurations Guide.
Enter the following prompt in your MCP Client to check if everything is working:
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.
The package also includes the chrome-devtools CLI. Use it to control the browser from your terminal without MCP:
See the CLI guide for all commands and options.
The package includes skills that teach your agent how to use Chrome DevTools:
A plugin installs the MCP server and all skills, including the CLI skill:
/plugin marketplace add ChromeDevTools/chrome-devtools-mcp, then /plugin install chrome-devtools-mcp@chrome-devtools-plugins.ChromeDevTools/chrome-devtools-mcp.gemini extensions install --auto-update https://github.com/ChromeDevTools/chrome-devtools-mcp.See the Client Configurations Guide for more information.
If your agent does not support plugins, copy the skill folders into the skills directory of your agent. The npm package contains the skills:
[!IMPORTANT] The
chrome-devtools-cliskill requires the CLI. Install the package globally before you use the skill.
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.
--auto-update.If you run into any issues, checkout our troubleshooting guide. See the full Tool Reference for a complete list of all supported MCP capabilities.
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.
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.
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
Clicks on the provided element
uid必填pageId必填dblClickincludeSnapshotCloses the page by its index. The last open page cannot be closed.
pageId必填Drag an element onto another element
pageId必填to_uid必填from_uid必填includeSnapshotEmulates various features on the target page. Each call replaces all emulation settings (except extraHttpHeaders), so pass all desired settings in a single call.
pageId必填viewportuserAgentcolorSchemegeolocationforcedColorsprefersContrastextraHttpHeaderscpuThrottlingRatenetworkConditionsprefersReducedMotionEvaluate 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必填filePathfunctionsourcePathdialogActionwaitForStableDomType text into an input, text area or select an option from a <select> element.
uid必填value必填pageId必填includeSnapshotFill 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必填includeSnapshotGets a console message by its ID. You can get all messages by calling list_console_messages.
msgid必填pageId必填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必填pageIdxpageSizeGets 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必填requestFilePathresponseFilePathIf a browser dialog was opened, use this command to handle it
action必填pageId必填promptTextHover over the provided element
uid必填pageId必填includeSnapshotGet 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必填outputDirPathList all console messages for the target page since the last navigation.
typespageId必填pageIdxpageSizeserviceWorkerIdincludeStackTracesincludePreservedMessagesLists the most recent requests for the target page since the last navigation.
pageId必填pageIdxpageSizeresourceTypesincludePreservedRequestsGet a list of pages open in the browser.
無需輸入參數。
Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.
urltypepageId必填timeoutinitScriptignoreCachehandleBeforeUnloadOpen a new tab and load a URL. Use project URL if not specified otherwise.
url必填timeoutbackgroundisolatedContextProvides 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必填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必填reloadautoStopfilePathignoreCacheStop the active performance trace recording on the target webpage.
pageId必填filePathPress 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必填includeSnapshotResizes the page's window so that the page has specified dimension
width必填height必填pageId必填Starts recording a screencast (video) of the target page.
pageId必填filePathStops the active screencast recording on the target page.
pageId必填Select a page as a context for future tool calls.
pageId必填bringToFrontCapture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.
pageId必填filePath必填Take a screenshot of the page or element.
uidformatpageId必填qualityfilePathfullPageTake 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必填verbosefilePathType text using keyboard into a previously focused input
text必填pageId必填submitKeyUpload a file through a provided element.
uid必填pageId必填filePaths必填includeSnapshotWait 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已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
"args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics"]{ "mcpServers": { "chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest"] } }}Check the performance of https://developers.chrome.comnpm i chrome-devtools-mcp@latest -gchrome-devtools navigate_page 1 --url "https://developers.chrome.com"chrome-devtools take_screenshot 1 --filePath screenshot.pngchrome-devtools stopnpm 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/npm i chrome-devtools-mcp@latest -gmkdir -p ~/.claude/skillscp -R "$(npm root -g)/chrome-devtools-mcp/skills/chrome-devtools-cli" ~/.claude/skills/