用于获取DOM元素浏览器截图的MCP服务器。
https://github.com/user-attachments/assets/1ab36d65-32be-42f5-b3fc-97618c2e96a7
$ git clone https://github.com/adtac/domshot.git
$ claude mcp add domshot -- $PWD/domshot/mcp.sh
重启Claude。
在希望给予Claude访问权限的页面上,在Chrome DevTools的控制台标签页中粘贴以下内容:
const el = document.createElement("script"); el.src = "http://localhost:8000/embed.js"; document.head.appendChild(el);
然后请求Claude调用get_browser_screenshot并描述结果。
$ claude
╭───────────────────────────────────────────────────╮
│ ✻ 欢迎使用Claude Code! │
│ │
│ 输入/help获取帮助,/status查看当前设置 │
│ │
│ 当前目录:/Users/user/src/tmp/domshot │
╰───────────────────────────────────────────────────╯
> 调用get_browser_screenshot工具并描述结果
⏺ 我将调用浏览器截图工具并描述我看到的内容。
McCartney: domshot:get_browser_screenshot (MCP)
⎿
⎿ [图片]
McCartney: 截图显示了一个简单的红色网页,白色文本“RED”居中显示在一个纯红色背景上。
</details>
MIT