Connect your collector.

Put ScrapeSentry in front of an existing Bright Data collector in five steps. The collector stays the source while ScrapeSentry becomes its contract and recovery layer.

Open live consoleView source
Keep Bright Data tokens on the server.Never place provider or operator secrets in a NEXT_PUBLIC_ variable.
01

Install the service

Clone the public repository, create a Python environment and install the typed FastAPI plus FastMCP service.

python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
02

Configure the collector

Point the server at the existing Scraper Studio collector. Live collection and Self-Healing consume provider credits, so monitoring remains opt-in.

APP_ENV=production
BRIGHTDATA_API_TOKEN=your_server_side_token
BRIGHTDATA_COLLECTOR_ID=c_msxcshnz2bwrroekf3
OPERATOR_API_TOKEN=use_a_long_private_value
03

Define the data contract

Edit examples/contract.json with required fields, types, row limits, null thresholds and business rules. Then start the API and MCP server.

uvicorn app.api:app --port 8000
python -m app.server

The included contract is already grounded in the production Books to Scrape output and its 12-row baseline.

04

Connect your coding agent

Add the local MCP server to Codex, Claude Code or Cursor. All agent actions use the same policy engine as the console.

{
  "mcpServers": {
    "scrapesentry": {
      "command": "python",
      "args": ["-m", "app.server"],
      "cwd": "/absolute/path/to/scrapesentry",
      "env": { "APP_ENV": "production" }
    }
  }
}
05

Consume protected output

Downstream systems read the safe-output endpoint. If a scrape is quarantined, this endpoint keeps serving the last verified snapshot with its age and warning.

curl   -H "Authorization: Bearer $OPERATOR_API_TOKEN"   http://127.0.0.1:8000/api/collectors/books-to-scrape/safe-output