io.github.Franksterino/citeguard

السجل الرسمي الأمن

Verify citations in AI text: fetches each cited source, returns verdicts with evidence quotes.

ماذا يمكنك أن تفعل مع io.github.Franksterino/citeguard؟

  • Fetches the cited source — with timeout handling, redirect tracking, a 5 MB cap, and an automatic archive.org fallback for dead links.
  • Checks source liveness — dead URLs, DOI redirects, and "soft 404s" (redirects that land on a homepage) are flagged explicitly.
  • Extracts the real content — boilerplate-stripped article text via Readability; PDFs supported.
  • Judges entailment — an LLM reads only the fetched source text (never its own world knowledge) and returns one of six verdicts.

التثبيت

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

Remote (streamable-http)
Claude Code
claude mcp add --transport http citeguard 'https://citeguard.boundy.workers.dev/mcp'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "citeguard": {
            "type": "http",
            "url": "https://citeguard.boundy.workers.dev/mcp"
        }
    }
}
NPM package citeguard
Claude Code
claude mcp add citeguard -e 'CITEGUARD_JUDGE_PRESET=<CITEGUARD_JUDGE_PRESET>' -e 'CITEGUARD_JUDGE_KEY=<your citeguard_judge_key>' -- npx -y citeguard@0.1.2
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "citeguard": {
            "command": "npx",
            "args": [
                "-y",
                "citeguard@0.1.2"
            ],
            "env": {
                "CITEGUARD_JUDGE_PRESET": "<CITEGUARD_JUDGE_PRESET>",
                "CITEGUARD_JUDGE_KEY": "<your citeguard_judge_key>"
            }
        }
    }
}

متغيرات البيئة

  • CITEGUARD_JUDGE_PRESET LLM judge preset: qwen | openai | anthropic
  • CITEGUARD_JUDGE_KEY إلزامي سري API key for the judge LLM (required for verify_claims/check_document; check_links works without it)

التوثيق

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

المحتويات
  1. CiteGuard
  2. What it does
  3. Quick start (MCP)
  4. Quick start (CLI)
  5. Judge configuration
  6. Hosted API
  7. What CiteGuard is not
  8. Extraction formats
  9. Development
  10. License

CiteGuard

Per-claim citation verification for AI-generated text. CiteGuard fetches every cited source and tells you whether it actually supports the claim — with a quoted evidence span, so you can verify the verdict yourself in seconds.

Built for the age of vibe citing: AI-drafted reports full of citations that resolve to real URLs but don't say what the text claims they say.

What it does

Give CiteGuard a document (markdown or plain text) or explicit claim+URL pairs. For each claim it:

  1. Fetches the cited source — with timeout handling, redirect tracking, a 5 MB cap, and an automatic archive.org fallback for dead links.
  2. Checks source liveness — dead URLs, DOI redirects, and "soft 404s" (redirects that land on a homepage) are flagged explicitly.
  3. Extracts the real content — boilerplate-stripped article text via Readability; PDFs supported.
  4. Judges entailment — an LLM reads only the fetched source text (never its own world knowledge) and returns one of six verdicts.
VerdictMeaning
supportedSource clearly states or directly entails the claim
partially_supportedPart of the claim is there, but a material element differs or is absent
contradictedSource states the opposite
unsupportedSource is real but does not contain the claim
uncertainSource text too fragmentary/ambiguous to decide
could_not_fetchSource unreachable and no archive snapshot — never guessed

Every verdict ships with a verbatim evidence quote, a confidence score, and full source status. Document audits also return a citation integrity score (0–100).

CiteGuard never overclaims: if it can't fetch a source, it says so instead of judging blind, and borderline cases land in uncertain — the goal is to make human verification 10× faster, not to replace it.

Quick start (MCP)

Add to Claude Code / Claude Desktop / any MCP client:

{
  "mcpServers": {
    "citeguard": {
      "command": "npx",
      "args": ["-y", "citeguard-mcp"],
      "env": {
        "CITEGUARD_JUDGE_PRESET": "qwen",
        "CITEGUARD_JUDGE_KEY": "sk-..."
      }
    }
  }
}

Tools exposed: verify_claims, check_document, check_links (liveness-only, needs no LLM key).

Quick start (CLI)

npm install -g citeguard

citeguard extract report.md   # show extracted claim/source pairs (no network)
citeguard links report.md     # dead-link check (no LLM needed)
citeguard check report.md     # full audit (needs judge configured)

Judge configuration

CiteGuard is model-agnostic — anything with an OpenAI-compatible chat endpoint works:

# Preset providers
export CITEGUARD_JUDGE_PRESET=qwen        # or: openai, anthropic
export CITEGUARD_JUDGE_KEY=sk-...

# Or any OpenAI-compatible endpoint
export CITEGUARD_JUDGE_URL=https://your-endpoint/v1
export CITEGUARD_JUDGE_MODEL=your-model
export CITEGUARD_JUDGE_KEY=sk-...

Hosted API

A free hosted endpoint (50 requests/day/IP) runs on Cloudflare Workers:

curl -X POST https://citeguard.YOUR-SUBDOMAIN.workers.dev/api/verify \
  -H "content-type: application/json" \
  -d '{"claims":[{"text":"The Eiffel Tower is 330 m tall.","source":"https://en.wikipedia.org/wiki/Eiffel_Tower"}]}'

Remote MCP endpoint: POST /mcp (streamable HTTP, stateless).

What CiteGuard is not

  • Not an AI-text detector. It doesn't care who wrote the text — it checks whether cited sources support claims.
  • Not a truth oracle. A supported verdict means the cited source says this, not this is true. Garbage source in, garbage support out.
  • Not a search engine. It verifies the citations you have; it doesn't find better ones (yet).

Extraction formats

Markdown inline links, reference-style links, footnotes, bare DOIs (resolved via doi.org), bare URLs. APA-style parsing and PDF input documents are on the roadmap.

Development

git clone https://github.com/Franksterino/citeguard
cd citeguard
npm install
npm run typecheck
npx tsx src/cli.ts extract test/fixtures/sample.md

License

MIT

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

ما هو io.github.Franksterino/citeguard؟

Verify citations in AI text: fetches each cited source, returns verdicts with evidence quotes.

كيف أثبّت io.github.Franksterino/citeguard؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http citeguard 'https://citeguard.boundy.workers.dev/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

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

نعم. يتطلب CITEGUARD_JUDGE_KEY، وتضبطها في إعداداته.

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

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.Franksterino/citeguard؟

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

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