简介
AI 驱动的浏览器自动化 MCP 服务器,支持网页抓取、表单填写、OAuth 认证等复杂任务,通过 TypeScript SDK 代码模式执行。
原始描述
Control browser automation agents via the Bits MCP server. Use when running web scraping, form filling, data extraction, or any browser-based automation task. Bits agents can navigate websites, click elements, fill forms, handle OAuth flows, and extract structured data.
中文使用说明 来自收录源
核心用法
Bits MCP 采用独特的 "Code Mode" 架构,用户通过自然语言描述任务后,AI 会:
- 自动检索 SDK 文档获取必要方法
- 生成并执行 TypeScript 代码完成浏览器操作
- 返回结构化数据(支持自定义 JSON Schema)
主要功能模块
- 导航与交互:URL 跳转、点击元素、表单填写、键盘操作
- 数据提取:页面文本抓取、截图、结构化数据输出
- 认证处理:OAuth 流程、登录表单、2FA(需预存凭证)
- 多窗口管理:标签页切换、弹窗处理
执行模式
支持两种调用方式:
- 即时任务:直接通过 MCP 工具描述需求即时执行
- 预设工作流:在 Bits 网页端创建工作流,通过 API 调用复用
显著优点
- AI 原生设计:不同于传统脚本工具,由 AI 自动生成执行代码,降低技术门槛
- TypeScript 沙箱:提供类型安全的执行环境,减少运行时错误
- 结构化输出:内置 JSON Schema 支持,便于下游数据集成
- 云端托管:无需本地浏览器基础设施,减少环境配置负担
- 实时观测:提供 live view URL 监控执行过程,便于调试
潜在缺点与局限性
- 成本不透明:基于云端浏览器会话计费,高频使用可能产生显著费用
- CAPTCHA 屏障:遇到验证码会中断任务,需人工介入或第三方服务
- 依赖网络稳定性:云端执行受限于 Bits 服务可用性和网络延迟
- 凭证管理风险:支持存储登录凭证,存在潜在的安全隐患
- 调试复杂度:代码自动生成机制使得精细控制困难,问题定位需查看 live view
- 供应商锁定:深度依赖 Bits 平台,迁移成本较高
适合人群
- 数据分析师:需要定期抓取公开网页数据
- 运营人员:批量处理表单提交、内容发布等重复性网页操作
- 开发者:快速验证网页自动化原型,无需搭建 Playwright/Puppeteer 环境
- 小型团队:缺乏专职自动化工程师,希望以低代码方式实现浏览器任务
常规风险
| 风险类型 | 说明 | 缓解建议 |
|---|---|---|
| 凭证泄露 | API Key(bb_*)和存储的登录信息可能被暴露 |
使用环境变量注入,避免硬编码;定期轮换密钥 |
| 数据隐私 | 网页内容可能包含敏感信息,传输至 Bits 云端 | 评估数据合规要求,避免处理 PII/机密数据 |
| 服务中断 | 第三方 SaaS 依赖,存在单点故障风险 | 关键任务需设计降级方案或本地备份工具 |
| 成本失控 | 按会话/时长计费,复杂任务可能超预期 | 设置预算告警,监控使用量 |
| 网站封禁 | 自动化行为可能触发目标站点的反爬机制 | 遵守 robots.txt,控制请求频率 |
技能正文
name: bits-mcp description: Control browser automation agents via the Bits MCP server. Use when running web scraping, form filling, data extraction, or any browser-based automation task. Bits agents can navigate websites, click elements, fill forms, handle OAuth flows, and extract structured data.
Bits MCP - Browser Automation
Bits is an AI browser automation platform. The MCP server lets you run browser automation tasks from your AI assistant.
Setup
1. Get an API Key
- Go to app.usebits.com
- Sign in with Google
- Navigate to Settings → API Keys
- Click Create API Key, give it a name
- Copy the key (starts with
bb_) — you won't see it again
2. Configure MCP
Add to your MCP config (e.g., ~/.openclaw/openclaw.json):
{
"mcpServers": {
"bits": {
"command": "npx",
"args": ["-y", "usebits-mcp"],
"env": {
"BITS_API_KEY": "bb_your_key_here"
}
}
}
}
For Claude Code (~/.claude.json):
{
"mcpServers": {
"bits": {
"command": "npx",
"args": ["-y", "usebits-mcp"],
"env": {
"BITS_API_KEY": "bb_your_key_here"
}
}
}
}
3. Restart
Restart your gateway/client to pick up the new MCP server.
Usage
The Bits MCP uses "Code Mode" — you write TypeScript SDK code that executes in a sandbox. Two tools are available:
- Documentation search — Query the SDK docs
- Code execution — Write and run TypeScript against the Bits SDK
Example: Scrape a Website
Use the Bits MCP to go to news.ycombinator.com and get the top 5 story titles
The agent will:
- Search docs for navigation/scraping methods
- Write TypeScript code to navigate and extract data
- Execute it and return results
Example: Fill a Form
Use Bits to go to example.com/contact, fill out the contact form with name "Test" and email "test@example.com", then submit
Example: Extract Structured Data
Use Bits to scrape the product listings from example-store.com/products and return them as JSON with name, price, and URL fields
Capabilities
- Navigate — Go to URLs, handle redirects
- Read pages — Extract text, get page layouts, take screenshots
- Interact — Click elements, fill inputs, press keys
- Handle auth — OAuth popups, login forms, 2FA (with stored credentials)
- Multi-window — Switch between tabs/popups
- Structured output — Return data in specific JSON schemas
Creating Workflows (Optional)
For repeated tasks, create a workflow in the Bits web app:
- Go to app.usebits.com → Workflows
- Create a workflow with a definition (instructions for the agent)
- Optionally add an output schema for structured responses
- Run via API:
POST /workflows/{id}/runs
Troubleshooting
"API key invalid" — Check your key starts with bb_ and is copied correctly.
Slow startup — First run downloads the MCP package via npx. Subsequent runs are faster.
Task stuck — Browser automation can hit CAPTCHAs or unexpected modals. Check the live view URL in the response.
Links
- Web app: app.usebits.com
- API docs: api.usebits.com/openapi.json
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。