---
name: rank-anything
description: Flat agent capability handbook for ANY-B02 Rank-Anything (https://rank.fastmesh.dev) — live 0-100 Technical SEO & AI Search GEO auditor plus deterministic 50-page HTML/Markdown/llms-full.txt/SKILL.md/JSON-LD compiler via /mcp, REST, CLI, Causal Bazaar, and 0%-commission treg hub.
---

# Rank-Anything (`rank.fastmesh.dev`) — Agent Capability Handbook

> **Guarantees**: Deterministic pure-stdlib verification · Signed `receipt_sha256` on every call · Strictly **`$0` billed (`billed_micros = 0`)** on dead links, HTTP 4xx/5xx, WAF challenges, fake-200 soft-404s, invalid input, or SSRF rejections · **Enterprise Zero Prompt & Trace Resale Pledge** (URLs, keywords, and audit payloads are never sold or licensed to third-party AI model trainers).

## Discovery & Integration Surfaces

| Surface | Endpoint / Identifier | Protocol / Pricing |
| :--- | :--- | :--- |
| **Remote MCP Server** | `https://rank.fastmesh.dev/mcp` | JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`) |
| **REST API + OpenAPI 3.1** | `https://rank.fastmesh.dev/openapi.json` | `POST /v1/audit`, `POST /v1/generate-pack`, `POST /v1/batch-audit`, `GET /health` |
| **treg hub (0% Commission)** | `rank-anything` | `$0.15` verified audit / `$1.50` 50-page pack (`$0` on miss/fake-200) |
| **Causal Bazaar Public Card** | `rank_anything_seo_geo_compiler_v1` | `is_public=1`, `price_micros=150000` audit / `1500000` pack (cap `<= $2.00`) |
| **Storefront & Prepaid Packs** | `https://rank.fastmesh.dev/` | `$19` (20 cr) / `$79` (120 cr) / `$249` (500 cr), `$0/mo` recurring |
| **Machine Directory & Guides** | `https://rank.fastmesh.dev/llms.txt` | Index of all 24 self-bootstrapped HTML + Markdown guides under `/seo_geo/` |

---

## 1. Calling via Remote `/mcp` (Claude, Cursor, Codex & MCP Clients)

Add `https://rank.fastmesh.dev/mcp` as a remote HTTP MCP server. The server exposes **3 direct flat tools** (`rank_audit_site`, `rank_generate_pack`, `rank_batch_audit`) alongside **4 DualMcpFacade meta-tools** (`tools_search`, `tools_inspect`, `tools_execute`, `tools_poll_receipt`).

### Initialize & List Tools

```bash
curl -fsSL -X POST "https://rank.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
```

### Invoke `rank_audit_site` (`$0.15` verified / `$0.015` same-tenant cache refresh / `$0` on failure)

```bash
curl -fsSL -X POST "https://rank.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: my-agent-workspace" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "rank_audit_site",
      "arguments": {
        "url": "https://resend.com/",
        "keyword": "developer email api"
      }
    }
  }'
```

### Invoke `rank_generate_pack` (`$1.50` verified compile, 1-50 unique pages)

```bash
curl -fsSL -X POST "https://rank.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: my-agent-workspace" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "rank_generate_pack",
      "arguments": {
        "url": "https://resend.com/",
        "brand_name": "Resend",
        "keywords": ["transactional email api", "developer email sdk"],
        "competitors": ["SendGrid", "Postmark"],
        "page_count": 50,
        "include_pages": true
      }
    }
  }'
```

### Invoke `rank_batch_audit` (Concurrent Table Waterfall, `$0` per failed/SSRF row)

```bash
curl -fsSL -X POST "https://rank.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "rank_batch_audit",
      "arguments": {
        "urls": ["https://resend.com/", "https://pilot.com/", "https://docs.astral.sh/ruff/"],
        "export_csv": true
      }
    }
  }'
```

---

## 2. Calling via Direct REST API

### Live Site Audit (`POST /v1/audit`)

```bash
curl -fsSL -X POST "https://rank.fastmesh.dev/v1/audit" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://docs.pydantic.dev/latest/","tenant_id":"agent_demo","keyword":"python validation"}'
```

Key verified response fields:
- `ok` (`bool`), `status_code` (`200` | `404` | `422`), `overall_score` (`0..100`), `technical_seo_score` (`0..40`), `geo_readiness_score` (`0..60`), `grade` (`A..F`)
- `archetype`: `{id, display_name, primary_schema_type, confidence, matched_signals}` (`saas_api`, `shopify_dtc`, `opensource_cli`, `b2b_services`, `industry_tool`)
- `missing_items`, `gaps`, `signals`, `fake_200_detected`, `fake_200_reason`
- `cache`: `{hit, status, is_repeat, ttl_s, age_s, upstream_fetch_skipped, cache_written}`
- `billed_micros` (`150000` new / `15000` repeat same-tenant / `0` unbilled), `receipt_sha256`

### Compile 1-50 Page GEO Asset Pack (`POST /v1/generate-pack`)

```bash
curl -fsSL -X POST "https://rank.fastmesh.dev/v1/generate-pack" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://pilot.com/","page_count":50,"include_pages":false}'
```

Returns `files` (`llms.txt`, `llms-full.txt`, `SKILL.md`, `sitemap.xml`, `citation_injection_playbook.md`), `pages` / `pages_manifest`, `intents_distribution` (6 intents: `alternative`, `versus`, `pricing`, `calculator`, `how_to`, `migration`), `invariants_verified`, `artifact_hashes`, and `receipt_sha256`.

---

## 3. Calling via `treg hub` (0% Seller Commission)

```bash
# Live SEO + GEO audit ($0.15 on verified hit, $0 on fake-200/dead link/SSRF)
treg call rank-anything --data '{"action":"audit","url":"https://fastapi.tiangolo.com/","keyword":"python api framework"}'

# Compile a 50-page GEO pack ($1.50 on verified compile)
treg call rank-anything --data '{"action":"generate-pack","url":"https://fastapi.tiangolo.com/","page_count":50,"include_pages":false}'
```

---

## 4. Agent Operating Rules & Billing Invariants

1. **Always inspect `ok`, `billed_micros`, and `fake_200_detected`**: never retry SSRF-blocked (`422`) or WAF-blocked targets in tight loops; both automatically bill `$0` (`billed_micros == 0`) and skip cache writes.
2. **Leverage cross-tenant ArchiveCache (`7d-30d` adaptive TTL)**: pass a consistent `tenant_id` (`X-Tenant-Id`) so repeat checks within the cache window automatically receive the **10% refresh fee (`$0.015`)**. Pass `"no_cache": true` only after deploying site fixes.
3. **Verify receipts deterministically**: record `receipt_sha256` and `artifact_hashes` from every pack compile before publishing generated files to production.
4. **Never assume private/internal URLs are scannable**: Rank-Anything strictly blocks loopback (`127.0.0.0/8`, `::1`), RFC1918 (`10/8`, `172.16/12`, `192.168/16`), cloud metadata (`169.254.169.254`), and non-HTTP(S) schemes (`file://`, `javascript:`).

---

## 5. Verified Empirical Baseline (2026-12-01 UTC)

- **Cross-Industry Benchmark (`intel/geo_gap_benchmarks.json`)**: `22` live accessible sites across 5 verticals — mean score `57.2/100` (`32.3/40` Technical SEO vs `24.9/60` GEO Readiness; `0/22` Grade A; `100%` missing `/SKILL.md` & `FAQPage` JSON-LD; `86.4%` missing explicit AI crawler rules & HTML tables; `68.2%` missing substantive `/llms-full.txt`).
- **Live Gauntlet Proof (`gauntlet/gauntlet_report.json`)**: `18/18` PASS (`100.0%`), `50`-page compile in `31 ms`, `16`-way parallel HTTP/MCP concurrency in `17 ms`, `38/38` unit tests PASS (`0` Python warnings).
- **Self-Bootstrap Receipt**: `473f90b44476da87ece1ea380344f3cf7993fcd53e08be20c8df1f99a5e1d5fa`
