{
  "markdown": "# LegalCite\n\n**Stop your AI from citing fake cases.** LegalCite checks every case citation in legal text against real court records (CourtListener) and flags hallucinated/fake or misattributed cites. A REST API + an MCP server.\n\n- **Live:** https://legalcite-one.vercel.app\n- **Verify API:** `GET /api/verify?text=<paragraph>` (or `?citation=\"410 U.S. 113\"`; also `POST {text}`)\n- **MCP:** `verify_citations(text)` → npm `legalcite-mcp`\n- **Data:** [CourtListener](https://www.courtlistener.com) (Free Law Project) — free public U.S. court records.\n\n## Verdicts\n| verdict | meaning |\n|---|---|\n| `real` | the case exists and (if named) the name matches |\n| `not-found` | no such case — likely hallucinated |\n| `mismatch` | citation is real, but the case name in the text is wrong |\n\n## How it resolves\n1. **Token-free (default):** reporter-aware regex extracts citations → each resolved via CourtListener's public `/c/{reporter}/{vol}/{page}/` finder (redirects to the opinion when real, 404 when not).\n2. **Token mode (optional):** set `COURTLISTENER_TOKEN` (free) → uses CourtListener's `citation-lookup` endpoint (Eyecite extraction + full metadata).\n\nIt never fabricates — an unresolved citation is reported `not-found`, never invented.\n\n## Layout\n```\napi/verify.js          REST endpoint (quota + verify)\napi/health.js          liveness + CourtListener check\napi/checkout|key|stripe-webhook.js   Stripe Pro billing\nlib/verify.js          citation extraction + CourtListener resolution (core)\nlib/store.js           Redis quota + key store (fail-open without REDIS_URL)\nlib/stripe.js          lazy Stripe client\nmcp/server.js          MCP stdio server — verify_citations tool\npublic/                landing, docs, pricing, llms.txt\nscripts/setup-stripe-product.js   one-time Stripe product/price (test key)\n```\n\n## Config (Vercel env — all optional for the MVP)\n- `COURTLISTENER_TOKEN` — free; enables richer citation-lookup + metadata.\n- `REDIS_URL` — Upstash; enables hard daily quota + caching (fail-open without it).\n- `STRIPE_SECRET_KEY` / `STRIPE_PRICE_ID` / `STRIPE_WEBHOOK_SECRET` — Pro billing.\n\n## Pricing\nFree: 20 checks/day by IP. Pro: 2,000/day, $19/mo, 7-day trial.\n\n> Not legal advice. Verifies citation existence/metadata only — not legal correctness or good-law status.\n",
  "bytes": 2291,
  "sha": "978683c31f59710350b1e1f3946c97c3c9544639f55ac3f70a8128b9bb25a362",
  "repo_slug": "kevinx702/legalcite",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kevinx702_legalcite_27974bf1/readme"
}