io.github.sh6drack/zen-mcp
平台与服务by sh6drack
MCP server for Zen Browser automation via WebDriver BiDi
什么是 io.github.sh6drack/zen-mcp?
MCP server for Zen Browser automation via WebDriver BiDi
README
zen-mcp
The first MCP server for Zen Browser. Automate Zen from Claude Code, Cursor, or any MCP client.
No Selenium. No Playwright. No browser drivers. Just WebSocket.
Setup (2 minutes)
1. Start Zen with remote debugging
/Applications/Zen.app/Contents/MacOS/zen --remote-debugging-port 9222
Pro tip: Add
alias zen='open /Applications/Zen.app --args --remote-debugging-port 9222'to your shell config. Then just runzen.
2. Add to Claude Code
# Option A: npm (recommended)
npm install -g zen-mcp
# Option B: Clone
git clone https://github.com/sh6drack/zen-mcp.git && cd zen-mcp && npm install
Add to ~/.claude/mcp_servers.json:
{
"mcpServers": {
"zen-browser": {
"command": "zen-mcp"
}
}
}
If you cloned instead of npm install, use
"command": "node", "args": ["/absolute/path/to/zen-mcp/server.mjs"]
Add to ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__zen-browser__*"]
}
}
That's it. Start a new Claude Code session and the zen_* tools are available.
20 Tools
Browse
| Tool | What it does |
|---|---|
zen_navigate | Go to a URL |
zen_list_pages | List all open tabs |
zen_select_page | Switch to a tab |
zen_new_tab | Open a new tab |
zen_close_tab | Close a tab |
See
| Tool | What it does |
|---|---|
zen_snapshot | Page structure with selectors (filter: all/interactive/form) |
zen_screenshot | Capture a screenshot |
zen_get_page_text | Get page title, URL, and text |
zen_get_form_fields | List all form fields with labels and values |
Interact
| Tool | What it does |
|---|---|
zen_click | Click an element |
zen_fill | Type into an input or textarea |
zen_select_option | Pick a dropdown option |
zen_check | Toggle a checkbox or radio |
zen_press_key | Keyboard input (Enter, Tab, Ctrl+A, etc.) |
zen_fill_form | Fill multiple fields at once |
zen_scroll | Scroll the page or to an element |
Utility
| Tool | What it does |
|---|---|
zen_evaluate | Run JavaScript in the page |
zen_wait | Wait N milliseconds |
zen_wait_for | Wait for text or element to appear |
zen_reconnect | Force reconnect to Zen |
How It Works
Claude Code ──stdio/MCP──> zen-mcp ──WebSocket/BiDi──> Zen Browser
zen-mcp speaks WebDriver BiDi (W3C standard) directly over WebSocket. Form filling uses native value setters with input/change event dispatch so React, Vue, and Angular apps work correctly.
What Works Well
- Navigation, clicking, form filling — rock solid, handles React/Vue/Angular
- Screenshots and page reads — reliable content extraction
- Tab management — open, close, switch between tabs
- JavaScript evaluation — run any code in the page context
- Keyboard input — shortcuts, Enter, Tab, modifier combos
Known Limitations
- Zen inherits Firefox's WebDriver BiDi implementation, which is still maturing. Some advanced BiDi commands that work in Chrome may not be available yet.
- Zombie sessions can only be cleared by restarting Zen (BiDi session.end is connection-scoped). zen-mcp detects this and tells you what to do.
- No file upload or drag-and-drop support (BiDi spec limitation).
Built-in Reliability
- Auto-reconnect with exponential backoff if WebSocket drops
- Zombie session recovery when a previous client crashed
- Connection retry (3 attempts with backoff)
- Clean shutdown on SIGINT/SIGTERM to prevent orphaned sessions
Troubleshooting
| Problem | Fix |
|---|---|
| "Cannot connect to Zen Browser" | Start Zen with --remote-debugging-port 9222 |
| "Maximum number of active sessions" | Restart Zen: killall zen && zen |
| Connection keeps dropping | Use zen_reconnect to force a fresh connection |
Config
| Env Variable | Default | Description |
|---|---|---|
ZEN_DEBUG_PORT | 9222 | Zen's remote debugging port |
Requirements
- Zen Browser
- Node.js 20+
Test
node test-e2e.mjs # 21 tests, needs Zen running
License
MIT
常见问题
io.github.sh6drack/zen-mcp 是什么?
MCP server for Zen Browser automation via WebDriver BiDi
相关 Skills
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
接口测试套件
by alirezarezvani
扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。
✎ 帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。