返回顶部
c

chrome-devtools-mcpChrome开发者工具MCP

Chrome DevTools MCP — Google's official browser automation and testing server. Control Chrome via Puppeteer through MCP protocol: click, fill forms, navigate, screenshot, performance traces, network inspection, console debugging. Use for browser testing, web automation, performance analysis, UI testing, form filling, and visual regression.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
2,273
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

chrome-devtools-mcp

🌐 Chrome DevTools MCP

谷歌官方Chrome DevTools MCP服务器——通过Puppeteer和Chrome DevTools协议,让AI代理完全控制一个实时运行的Chrome浏览器。

功能特性

  • - 输入自动化 — 点击、拖拽、填写表单、悬停、按键、上传文件、处理对话框
  • 导航 — 打开/关闭/切换页面、等待元素/网络空闲
  • 截图与快照 — 以视觉和DOM形式捕获页面状态
  • 性能追踪 — 记录并分析Chrome性能追踪,提供洞察
  • 网络检查 — 列出/检查网络请求和响应
  • 控制台调试 — 读取控制台消息,附带源码映射的堆栈跟踪
  • 设备模拟 — 模拟移动设备、调整视口大小
  • 表单自动化 — 一次性填写多个表单字段

系统要求

  • - Node.js v20.19+(OpenClaw中已预装)
  • Chrome/Chromium浏览器

快速开始

安装与验证

bash
npx -y chrome-devtools-mcp@latest --help

启动MCP服务器

bash

标准模式(自动启动Chrome)


npx -y chrome-devtools-mcp@latest

无头模式(适用于服务器)

npx -y chrome-devtools-mcp@latest --headless

连接到已有的Chrome(需以 --remote-debugging-port=9222 参数启动)

npx -y chrome-devtools-mcp@latest --browser-url=http://127.0.0.1:9222

禁用遥测

npx -y chrome-devtools-mcp@latest --no-usage-statistics --no-performance-crux

OpenClaw MCP集成

在 openclaw.json 的MCP服务器配置中添加:

json
{
mcp: {
servers: {
chrome-devtools: {
command: npx,
args: [-y, chrome-devtools-mcp@latest, --headless, --no-usage-statistics]
}
}
}
}

或使用设置脚本:

bash
python3 {baseDir}/scripts/setupchromemcp.py setup
python3 {baseDir}/scripts/setupchromemcp.py status
python3 {baseDir}/scripts/setupchromemcp.py test

工具参考

输入自动化(8个工具)

工具描述关键参数
click点击元素uid(必填)、dblClick
drag
将元素拖拽到另一个元素上 | fromuid、touid | | fill | 在输入框/文本域/选择框中输入文本 | uid、value | | fill_form | 一次性填写多个表单元素 | elements[] | | handle_dialog | 接受/关闭浏览器对话框 | action(accept/dismiss) | | hover | 悬停在元素上 | uid | | press_key | 按下键盘按键 | key | | upload_file | 上传文件到输入框 | uid、paths[] |

导航(6个工具)

工具描述关键参数
navigatepage跳转到URLurl
newpage
打开新标签页 | url | | close_page | 关闭当前标签页 | — | | list_pages | 列出所有打开的标签页 | — | | select_page | 切换到指定标签页 | index | | wait_for | 等待元素/网络 | event、uid、timeout |

调试(5个工具)

工具描述
takescreenshot将页面捕获为图片
takesnapshot
获取DOM/无障碍快照 | | evaluate_script | 在页面中运行JavaScript | | listconsolemessages | 获取控制台日志条目 | | getconsolemessage | 获取特定控制台消息 |

性能(3个工具)

工具描述
performancestarttrace开始性能录制
performancestoptrace
停止并获取追踪数据 | | performanceanalyzeinsight | 对追踪进行AI分析 |

网络(2个工具)

工具描述
listnetworkrequests列出所有网络请求
getnetworkrequest
获取请求/响应详情 |

模拟(2个工具)

工具描述
emulate模拟设备(手机、平板)
resize_page
更改视口大小 |

常见工作流

测试网页

  1. 1. navigatepage → URL
  2. takesnapshot → 获取元素UID
  3. click/fill → 与元素交互
  4. take_screenshot → 捕获结果

性能审计

  1. 1. navigatepage → URL
  2. performancestarttrace
  3. 与页面交互
  4. performancestoptrace
  5. performanceanalyze_insight

表单测试

  1. 1. navigatepage → 表单URL
  2. takesnapshot → 识别表单字段
  3. fillform → 一次性填写所有字段
  4. click → 提交按钮
  5. takescreenshot → 验证结果

隐私说明

  • - 谷歌默认收集使用统计信息 — 使用 --no-usage-statistics 禁用
  • 性能工具可能将追踪URL发送至谷歌CrUX API — 使用 --no-performance-crux 禁用
  • 避免在浏览器会话中分享敏感数据

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 chrome-devtools-mcp-1776419965 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 chrome-devtools-mcp-1776419965 技能

通过命令行安装

skillhub install chrome-devtools-mcp-1776419965

下载

⬇ 下载 chrome-devtools-mcp v1.0.0(免费)

文件大小: 4.59 KB | 发布时间: 2026-4-17 19:10

v1.0.0 最新 2026-4-17 19:10
Initial release of Chrome DevTools MCP.

- Control a live Chrome browser with Puppeteer and the Chrome DevTools Protocol.
- Automate clicks, form filling, navigation, and handle browser dialogs.
- Capture screenshots, DOM snapshots, and run JavaScript in the page.
- Record and analyze performance traces, inspect network requests, and review console messages.
- Emulate mobile devices and resize the viewport for testing.
- Designed for web automation, browser testing, performance analysis, and visual regression use cases.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部