B2B AI-Readiness Enricher
README.md
# B2B AI-Readiness Enricher — MCP server for company due-diligence (llms.txt, AI crawlers, pricing, SOC 2)
**Give your AI agent a reliable, deterministic "is this B2B vendor agent-ready and enterprise-safe?" lookup.**
One call returns, for any public company domain:
| Signal | What you get |
|---|---|
| `llms.txt` | present / title / summary / sections / link count (HTML soft-404s are *not* counted) |
| `robots.txt` AI crawlers | `GPTBot`, `ClaudeBot`, `PerplexityBot` → `allowed` / `partially_restricted` / `blocked` / `allowed_by_default` |
| `/pricing` | price amounts, currency, tiers, free tier, free trial, **self-serve vs sales-led** |
| Trust & docs | **SOC 2**, **ISO 27001**, **HIPAA**, **GDPR** mentions (with evidence snippet), status page URL, OpenAPI/docs URLs |
| Readiness score | transparent 0–100 score with a per-component breakdown |
Rule-based and reproducible — **no LLM guessing, no headless browser, no login walls.**
## Why it is safe to run on user-supplied domains
- **Public pages only.** Fetches `/`, `/llms.txt`, `/robots.txt`, `/pricing` — nothing else.
- **Honest failures.** HTTP `403`/`401`/`429` are reported as `blocked`, `404` as `missing`. We never retry with other identities and never bypass a block.
- **Honors `robots.txt`** for its own page fetches (`skipped_robots`).
- **SSRF-hardened**: rejects `localhost`, `127.0.0.0/8`, `10/8`, `172.16/12`, `192.168/16`, `169.254/16` (cloud metadata), `0.0.0.0/8`, CGNAT `100.64/10`, IPv6 loopback / link-local / unique-local, decimal/hex/octal-encoded IPs, non-HTTP(S) schemes, credentials-in-URL, odd ports. DNS answers are checked (also at connect time), and **every redirect hop is re-validated**. Limits: 1.5 MB body, 8 s per request.
- **You are billed only for useful results.** If nothing could be fetched (site down / fully blocked), the lookup is free. Results are streamed to the dataset right after each charge, and withheld if Apify does not confirm the charge (`chargedCount`).
- **Bounded cost per domain.** A hard 20 s total deadline covers all fetches of one domain, and a batch stops after 25 consecutive unreachable domains.
- Dev runs without PPE pricing configured: set env `B2B_ALLOW_UNBILLED=1` to still receive results.
## Pricing — Pay-Per-Event, $0.015 per company (**$15 / 1,000**)
| Event | Price | When |
|---|---|---|
| `company-enriched` | **$0.015** | A company domain returned at least one readable document |
| `actor-start` | ≈ $0.00005 | Platform start event |
Set **Max charge (USD)** in the input — the Actor stops fetching *before* the next charge would exceed it.
## Unit economics (builder-side margin math)
Apify pays the developer `profit = 0.8 × revenue − platform compute costs`.
| | per 1,000 companies |
|---|---|
| Revenue (`1000 × $0.015`) | $15.00 |
| Apify share retained by developer (80 %) | $12.00 |
| Estimated compute (`1000 × $0.00025`; measured ≈ $0.00003, ~8× safety) | −$0.25 |
| **Profit** | **$11.75 → 78.3 % net margin** |
Sensitivity: compute at $0.001/company → 73.3 %; at $0.002 → 66.7 %. Margins are before income tax and payout fees.
Break-even is ~$0.0003 revenue per company; **a $20 first payout needs ≈ 1,700 billed companies** ($20 / $0.01175).
## Use it
### Claude Desktop / Claude Code / Cursor (MCP)
Apify Standby exposes the server at `/mcp`. Add it with your Apify token:
```json
{
"mcpServers": {
"b2b-enricher": {
"url": "https://<username>--b2b-ai-readiness-enricher.apify.actor/mcp",
"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
}
}
}
```
Tool: `enrich_b2b_domain({ "domain": "stripe.com" })`.
### n8n (HTTP Request node)
`POST https://<username>--b2b-ai-readiness-enricher.apify.actor/mcp` with header `Authorization: Bearer <APIFY_TOKEN>` and JSON body:
```json
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "enrich_b2b_domain", "arguments": { "domain": "{{$json.domain}}" } } }
```
Then: `IF {{ $json.result.structuredContent.enrichment.readiness.score }} > 60` → Slack / CRM node.
### Batch run (Apify Console / API)
```json
{ "domains": ["stripe.com", "linear.app"], "maxChargeUsd": 1 }
```
Results land in the dataset (`overview` view).
### Local CLI
```bash
node --import tsx src/main.ts stripe.com --json
```
## Use cases
Sales-engineering lead scoring · vendor/security pre-screening (SOC 2 / ISO 27001 / GDPR) · "is our docs agent-ready?" audits · competitive pricing intelligence · GEO / AI-search (llms.txt, GPTBot policy) agency reports.
## Limits
Pricing pages rendered purely client-side may show little text (flagged in `notes`; JavaScript is not executed). Only `/pricing` is tried — other paths are not guessed. Trust signals are *mentions on public pages*, not audited certifications.
## Next catalog Actors (January 4-Actor plan)
1. **`llms-txt-quality-auditor`** — fetch `/llms.txt` + `/llms-full.txt`, validate against the llmstxt.org format (H1, blockquote, H2 link lists), flag dead links (SSRF-safe, HEAD/GET ≤ 50 links), score 0–100. *Event:* `site-audited` $0.02. Pure static text → near-zero DOM breakage.
2. **`mcp-server-health-checker`** — given an MCP endpoint URL, run `initialize` → `tools/list`, record protocol version, tool count, schema validity, latency, auth requirement; designed for scheduled runs + webhook on change. *Event:* `endpoint-checked` $0.01. Protocol-level (JSON-RPC), no HTML parsing.
3. **`security-txt-trust-center-monitor`** — read `/.well-known/security.txt`, `/.well-known/openid-configuration`, `/robots.txt`, and status-page JSON (Atlassian Statuspage `/api/v2/status.json`), report disclosure contact, expiry, incident state; diff vs. previous run. *Event:* `domain-snapshot` $0.01. Uses documented machine-readable endpoints only.
## Compliance notes
Collects only data the site publishes for any visitor or crawler. No personal data, no logins, no CAPTCHA handling. See Apify's Terms and your jurisdiction's rules before using results for outreach.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues