For builders

Leads-Finder MCP

Read-only access to scraped lead data, for your MCP client. A dedicated Model Context Protocol server over the InstaGrowth Leads-Finder data. It searches candidates, reads job status, and validates scrape requests — it does not start, cancel, or retry any scrape.

stdio · JSON-RPC 2.0 · MCP 2024-11-05

leads_finder_status

Database reachability, the target-pool row estimate, schedules, latest runs, and the BullMQ leads-finder queue counts. Unknown values are returned as null.

no side effects

leads_finder_get_schema

Output fields, the closed filter list, sort order, pagination rules, and supported scrape types. Call this first to learn valid arguments.

no side effects

leads_finder_search_candidates

Allow-listed filters with keyset pagination, newest first, up to 100 per page. Filter by source, username prefix, bio keyword, follower range, enrichment flags, and creation dates.

no side effects

leads_finder_get_candidate

Returns one target-pool row by UUID, limited to the allow-listed output fields.

no side effects

leads_finder_get_job

One run record: status, counts, timestamps, and the last three error messages, redacted before they are returned.

no side effects

leads_finder_preview_run

Validates a scrape request and reports what it would do. It enqueues nothing and reads no candidate rows.

no side effects

Connect the server

Register only this server with your MCP client — do not add the general Metatron MCP for this purpose. Replace the placeholders; never commit real credentials. Use a dedicated read-only database role (never the owner or superuser) and store the password in ~/.pgpass with chmod 600.

{
  "mcpServers": {
    "leads-finder": {
      "type": "stdio",
      "command": "/opt/homebrew/bin/python3.14",
      "args": ["/path/to/leads-finder-mcp/server.py"],
      "env": {
        "LEADS_FINDER_PG_DSN": "host=<db-host> dbname=instagrowth user=leads_finder_ro connect_timeout=5",
        "LEADS_FINDER_REDIS_URL": "redis://<redis-host>:6379/0",
        "LEADS_FINDER_ACTOR": "<your-id>"
      }
    }
  }
}

Limits: 8s statement timeout · 5s connect timeout · 25 per page by default, 100 max · preview scope 25 targets / 30 pages · NATIVE_LEAD_MAX_PAGES clamped 1–30.

Security model

  • Read-only at the database. Every connection sets default_transaction_read_only=on; a test confirms CREATE TABLE is rejected.

  • No raw SQL input. Fixed statements with bound parameters; filters come from a closed list — unknown keys are rejected, not ignored.

  • Field allow-list. Metadata JSONB and all credential-bearing tables are excluded; bios truncated to 300 characters.

  • Redis is read-only. Only TYPE, LLEN, ZCARD, HLEN, GET, and EXISTS are issued.

  • Audit log. Each call records timestamp, request ID, actor, tool, argument names (never values), outcome, and duration.

  • Errors do not leak. Callers receive a request ID and a generic message; driver text is never returned.

Deliberately absent: no run controls. start_run, cancel_job, and retry_job are not implemented — to start a scrape, use the backend API with an authorised account. This server only reports whether a request is valid and what the status of a run is.

Ask for leads in plain English

Connect the Leads-Finder MCP to Claude, Cursor, or any MCP client — then ask. Click a query to copy it: