Chrome DevTools MCP — Google 官方的浏览器自动化测试服务器,通过 Puppeteer 在 MCP 协议下控制 Chrome,实现点击、填表、导航等功能。
Google's official Chrome DevTools MCP server — gives AI agents full control of a live Chrome browser via Puppeteer and the Chrome DevTools Protocol.
bash
npx -y chrome-devtools-mcp@latest --help
bash
# Standard (launches Chrome automatically)
npx -y chrome-devtools-mcp@latest
# Headless mode (for servers)
npx -y chrome-devtools-mcp@latest --headless
# Connect to existing Chrome (must be started with --remote-debugging-port=9222)
npx -y chrome-devtools-mcp@latest --browser-url=http://127.0.0.1:9222
# Disable telemetry
npx -y chrome-devtools-mcp@latest --no-usage-statistics --no-performance-crux
Add to your openclaw.json under MCP servers:
json
{
"mcp": {
"servers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--headless", "--no-usage-statistics"]
}
}
}
}
Or use the setup script:
bash
python3 {baseDir}/scripts/setup_chrome_mcp.py setup
python3 {baseDir}/scripts/setup_chrome_mcp.py status
python3 {baseDir}/scripts/setup_chrome_mcp.py test
ToolDescriptionKey ParamsclickClick an elementuid (required), dblClick``dragDrag element onto anotherfrom_uid, to_uid``fillType text into input/textarea/selectuid, value``fill_formFill multiple form elements at onceelements[]``handle_dialogAccept/dismiss browser dialogsaction (accept/dismiss)hoverHover over elementuid``press_keyPress keyboard keykey``upload_fileUpload file to inputuid, paths[]
ToolDescriptionKey Paramsnavigate_pageGo to URLurl``new_pageOpen new taburl``close_pageClose current tab—list_pagesList all open tabs—select_pageSwitch to tabindex``wait_forWait for element/networkevent, uid, timeout
ToolDescriptiontake_screenshotCapture page as imagetake_snapshotGet DOM/accessibility snapshotevaluate_scriptRun JavaScript in pagelist_console_messagesGet console log entriesget_console_messageGet specific console message
ToolDescriptionperformance_start_traceBegin performance recordingperformance_stop_traceStop and get trace dataperformance_analyze_insightAI analysis of trace
ToolDescriptionlist_network_requestsList all network requestsget_network_requestGet request/response details
ToolDescriptionemulateEmulate device (mobile, tablet)resize_pageChange viewport size
navigate_page → URLtake_snapshot → get element UIDsclick/ fill → interact with elementstake_screenshot → capture resultnavigate_page → URLperformance_start_traceperformance_stop_traceperformance_analyze_insightnavigate_page → form URLtake_snapshot → identify form fieldsfill_form → fill all fields at onceclick → submit buttontake_screenshot → verify result--no-usage-statistics--no-performance-crux