scraper-health-mcp
Enables autonomous self-healing scraper fleet management for Bright Data Scraper Studio, with health checking, anomaly detection, and automated AI-driven scraper repair and approval.
README
Scraper-Health-MCP
Autonomous Self-Healing Scraper Fleet Manager for Bright Data Scraper Studio
The first agent that closes Bright Data's self-healing loop end-to-end without a human in the middle — turning the
resume_automation_jobendpoint the official demo couldn't find into a one-command "deploy and forget" scraper fleet.
Built for WeMakeDevs Into the Scrape-Verse hackathon (Aug 17–23, 2026).
🎯 The Problem
Web scrapers break silently. When a target site renames a CSS class, moves a field, or redesigns a layout, traditional scrapers return empty/garbage rows with no alarm. The failure is discovered only when a human notices the data is wrong — by which point downstream systems have been consuming bad data for hours or days.
✅ The Solution
Scraper-Health-MCP is an autonomous AI agent that wraps Bright Data's Scraper Studio self-healing API into a fully automated loop:
- Monitor — Runs scrapers on schedule and health-checks every result
- Detect — Catches breakage via schema validation, null-field detection, and row-count anomaly detection (Sentinel-style statistical baselines)
- Heal — Triggers Bright Data's AI self-healing (
refactor_template) - Auto-Approve — Programmatically accepts the AI's proposed extraction diff via
resume_automation_job(the step Bright Data's own demo couldn't do) - Verify — Re-scrapes and confirms health is restored
- Escalate — If healing fails, regenerates the scraper from scratch
🔑 The Technical Unlock
Bright Data's official self-healing demo repo (anil-bd/scraper-studio-self-healing-demo) explicitly states the public API "does not document an endpoint to approve programmatically" and exits with code 3 (awaiting approval) when the heal hits pending_answer, requiring manual UI approval.
The current docs DO expose POST /resume_automation_job with {message: true, auto_save: true} to accept the diff automatically. This means a fully autonomous, hands-off self-healing loop is now buildable — and almost no competitor will have found this.
🤖 MCP Server
The agent exposes 5 MCP tools callable from Claude Code, Cursor, or any MCP-compatible AI agent:
| Tool | Description |
|---|---|
create_scraper |
Create a new scraper from URL + description via Bright Data AI Flow |
run_collector |
Trigger a collector and return results |
health_check |
Run collector + check output health (schema, nulls, row-count anomaly) |
self_heal |
Full autonomous loop: detect → heal → auto-approve → re-scrape → verify |
verify |
Verify a healed collector has restored health |
🏗️ Architecture
Register collector (ID + schema + required fields)
│
▼
Schedule / trigger run ──► POST /dca/trigger
│
▼
Health-check result ──► GET /dca/dataset (schema drift? nulls? row-count anomaly?)
│
├── healthy ─► log success, schedule next run
└── broken ─► TRIGGER SELF-HEAL
│
▼
POST /refactor_template (targeted heal prompt from the failed field)
│
▼
Poll /refactor_template/progress
│
├── status:"pending_answer" ─► POST /resume_automation_job
│ {message:true, auto_save:true} ← the unlock
└── done/failed
│
▼
Re-scrape + verify against baseline schema
│
├── passes ─► log heal event, resume schedule
└── fails ─► escalate: regenerate scraper from scratch (Workflow 1)
+ alert/notification
🛠️ Tech Stack
| Layer | Tech |
|---|---|
| Scraper infra | Bright Data Scraper Studio (CLI + AI Flow API) |
| Backend | Python 3.12 + FastAPI |
| Agent interface | MCP server (5 tools) |
| Anomaly detection | In-package stats (mean/std row-count + schema validator) |
| Dashboard | Jinja2 templates + dark-themed HTML/CSS/JS |
| Deploy | Vercel serverless (free tier) |
| Repo | github.com/0xConsole/scraper-health-mcp |
🚀 Setup
# Clone
git clone https://github.com/0xConsole/scraper-health-mcp.git
cd scraper-health-mcp
# Install
pip install -r requirements.txt
# Run (mock mode — no API key needed)
python -m uvicorn app.main:app --reload
# Run (live mode — with Bright Data API key)
export BRIGHTDATA_API_KEY="your-key-here"
python -m uvicorn app.main:app --reload
Open http://localhost:8000 to see the dashboard.
📡 API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | / |
Dashboard |
| GET | /api/health |
Health check |
| GET | /api/status |
Full orchestrator status |
| GET | /api/tools |
List MCP tools |
| GET | /api/mcp/manifest |
MCP server manifest |
| POST | /api/create_scraper |
Create scraper (MCP tool 1) |
| POST | /api/run_collector |
Run collector (MCP tool 2) |
| POST | /api/health_check |
Health check (MCP tool 3) |
| POST | /api/self_heal |
Self-heal loop (MCP tool 4) |
| POST | /api/verify |
Verify heal (MCP tool 5) |
| POST | /api/demo |
Full demo (break + heal cycle) |
| POST | /api/trigger_breakage |
Simulate breakage + trigger heal |
🎪 Demo
- Click "Run Full Demo" on the dashboard
- The agent health-checks all registered collectors
- Simulates a site change (breakage) on the first collector
- Detects the breakage via health check (null fields, row count anomaly)
- Triggers AI self-healing (
refactor_template) - Polls until the AI proposes a diff (
pending_answer) - Auto-approves the diff via
resume_automation_job← the unlock - Re-scrapes and verifies health is restored
- Logs the entire heal event in the timeline
📊 What's Real vs Mocked
| Component | Status |
|---|---|
| MCP server (5 tools) | ✅ Real — fully functional |
| Health checker (schema, nulls, anomaly) | ✅ Real — Sentinel-style stats |
| Heal orchestrator (full loop) | ✅ Real — all states wired |
Auto-approve (resume_automation_job) |
✅ Real — calls actual endpoint when API key set |
| Bright Data API calls | 🔧 Mock mode (no key) / Real (with key) |
| Demo collectors | ✅ 3 seeded (HN, e-commerce, docs) |
| Dashboard + heal timeline | ✅ Real — live data from orchestrator |
📝 License
Apache 2.0
🔗 Links
- Live demo: https://scraper-health-mcp.vercel.app
- GitHub: https://github.com/0xConsole/scraper-health-mcp
- Hackathon: WeMakeDevs Into the Scrape-Verse (Aug 17–23, 2026)
- Bright Data Scraper Studio: https://brightdata.com/scraper-studio
Built by Sentinel Dev · Team: Xayaan Ibrahim (Individual)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。