io.github.Kevinx702/legalcite

السجل الرسمي الحكومة والقانون

Verify legal case citations against real court records; flag fake/hallucinated cites.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package legalcite-mcp
Claude Code
claude mcp add legalcite -- npx -y legalcite-mcp@0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "legalcite": {
            "command": "npx",
            "args": [
                "-y",
                "legalcite-mcp@0.1.0"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. LegalCite
  2. Verdicts
  3. How it resolves
  4. Layout
  5. Config (Vercel env — all optional for the MVP)
  6. Pricing

LegalCite

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.

  • Live: https://legalcite-one.vercel.app
  • Verify API: GET /api/verify?text=<paragraph> (or ?citation="410 U.S. 113"; also POST {text})
  • MCP: verify_citations(text) → npm legalcite-mcp
  • Data: CourtListener (Free Law Project) — free public U.S. court records.

Verdicts

verdictmeaning
realthe case exists and (if named) the name matches
not-foundno such case — likely hallucinated
mismatchcitation is real, but the case name in the text is wrong

How it resolves

  1. 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).
  2. Token mode (optional): set COURTLISTENER_TOKEN (free) → uses CourtListener's citation-lookup endpoint (Eyecite extraction + full metadata).

It never fabricates — an unresolved citation is reported not-found, never invented.

Layout

api/verify.js          REST endpoint (quota + verify)
api/health.js          liveness + CourtListener check
api/checkout|key|stripe-webhook.js   Stripe Pro billing
lib/verify.js          citation extraction + CourtListener resolution (core)
lib/store.js           Redis quota + key store (fail-open without REDIS_URL)
lib/stripe.js          lazy Stripe client
mcp/server.js          MCP stdio server — verify_citations tool
public/                landing, docs, pricing, llms.txt
scripts/setup-stripe-product.js   one-time Stripe product/price (test key)

Config (Vercel env — all optional for the MVP)

  • COURTLISTENER_TOKEN — free; enables richer citation-lookup + metadata.
  • REDIS_URL — Upstash; enables hard daily quota + caching (fail-open without it).
  • STRIPE_SECRET_KEY / STRIPE_PRICE_ID / STRIPE_WEBHOOK_SECRET — Pro billing.

Pricing

Free: 20 checks/day by IP. Pro: 2,000/day, $19/mo, 7-day trial.

Not legal advice. Verifies citation existence/metadata only — not legal correctness or good-law status.

الأسئلة الشائعة

ما هو io.github.Kevinx702/legalcite؟

Verify legal case citations against real court records; flag fake/hallucinated cites.

كيف أثبّت io.github.Kevinx702/legalcite؟

يعمل على جهازك. في Claude Code: claude mcp add legalcite -- npx -y legalcite-mcp@0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.Kevinx702/legalcite إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.Kevinx702/legalcite مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.Kevinx702/legalcite؟

ينشره Kevinx702. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.