Skip to main content
Glama

🛡️ CiteGuard MCP (citeguard-mcp)

Stop LLMs from Hallucinating Fake Papers, Chimera DOIs, and Retracted Citations.
Zero-config Model Context Protocol (MCP) Server & CLI for Claude Code, Cursor, Windsurf, VS Code Copilot, and CI/CD pipelines.

CI Glama MCP Server Python 3.10+ MCP Compatible Zero Dependencies License: MIT


TIP

⭐If CiteGuard saves you from an embarrassing hallucinated citation in a paper, grant, PR, or technical report, please consider starring this repository!

🚨 Why CiteGuard?

Even frontier LLMs frequently fail at scientific and technical citations in three insidious ways:

  1. ❌ Fabricated Identifiers (FABRICATED_OR_UNRESOLVED): Inventing plausible-looking DOIs (10.1038/s41591-025-99999-z), PubMed PMIDs, or arXiv IDs that return 404.

  2. ⚠️ Chimera Citations (CHIMERA_MISMATCH): Grabbing a real DOI from a famous paper (so naive regex/HTTP checks pass!) but attaching a completely fabricated title, wrong author, or wrong year.

  3. 🚨 Silent Retractions (RETRACTED): Citing papers that have been formally retracted in Crossref, PubMed, or OpenAlex.

citeguard-mcp solves all three with zero API keys and zero third-party Python dependencies (100% Python standard library), querying Crossref, DataCite (CERN Zenodo), PubMed (NCBI E-utilities), OpenAlex, and arXiv in real time.


Related MCP server: MCP Refchecker

⚡ 10-Second Quickstart

1. Plug into Claude Code / Claude Desktop / Cursor / Windsurf (MCP Server)

Claude Code (CLI)

claude mcp add citeguard -- uvx --from git+https://github.com/Lukecele/citeguard-mcp citeguard-mcp serve

Cursor / Claude Desktop / Windsurf (mcp.json or claude_desktop_config.json)

{
  "mcpServers": {
    "citeguard": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Lukecele/citeguard-mcp",
        "citeguard-mcp",
        "serve"
      ]
    }
  }
}

2. Run Directly from the Terminal (CLI)

# Install via pipx / uv / pip
pip install git+https://github.com/Lukecele/citeguard-mcp

# 1. Audit an entire Markdown manuscript, LaTeX file, or BibTeX bibliography
citeguard audit manuscript.md --strict
citeguard audit references.bib

# 2. Verify a single DOI + detect Chimera title/author/year hallucinations
citeguard verify "10.1038/s41586-021-03819-2" \
  --title "Highly accurate protein structure prediction with AlphaFold" \
  --author "Jumper" --year 2021

# 3. Search 100% verified literature across OpenAlex, PubMed, Crossref & arXiv
citeguard search "spatial transcriptomics drug resistance" --limit 5

# 4. Generate clean, deterministic BibTeX from a mix of DOIs, PMIDs, and arXiv IDs
citeguard bibtex 10.1038/s41586-021-03819-2 PMID:34265844 arXiv:1706.03762

# 5. Check if a DOI has been retracted
citeguard retraction "10.1016/S0140-6736(97)11096-0"

🧰 MCP Tools Exposed to Your AI Agent

Tool Name

Description

Registries Queried

verify_citation

Verifies a DOI, PMID:xxxx, arXiv:xxxx.xxxxx, or paper title. Checks claimed title, author, and year to catch Chimera hallucinations and retractions. Returns canonical BibTeX & APA.

Crossref · DataCite/Zenodo · PubMed · OpenAlex · arXiv

audit_document_citations

Scans an entire Markdown, LaTeX, BibTeX, or draft LLM response concurrently and returns a Citation Integrity Score (0–100%) with per-citation diagnostics.

All 5 registries (concurrent thread pool)

search_verified_literature

Searches for real, peer-reviewed / preprint papers before the LLM writes a citation, returning verified DOIs, citation counts, open-access PDFs, and BibTeX.

OpenAlex · PubMed (NCBI) · arXiv

generate_bibtex

Resolves an array of DOIs, PMIDs, and arXiv IDs into normalized @article{...} BibTeX blocks.

Crossref · DataCite · PubMed · arXiv

check_retraction

Checks Crossref update-to notices and OpenAlex is_retracted metadata for retractions or expressions of concern.

Crossref · OpenAlex


🤖 CI/CD Guardrail for GitHub Pull Requests

Prevent hallucinated or broken DOIs/BibTeX entries from ever being merged into your documentation or papers:

- name: Audit citations with CiteGuard
  run: |
    pip install git+https://github.com/Lukecele/citeguard-mcp
    citeguard audit paper.md --strict

🧪 Running Tests

git clone https://github.com/Lukecele/citeguard-mcp.git
cd citeguard-mcp
pip install -e ".[dev]"
pytest -v

👤 Author & License

Created by Luca Celebrano (@Lukecele · ORCID 0009-0007-0931-3555).
Released under the MIT License.

Available Tools

5 tools
audit_document_citationsAudit All Citations in a Document (Markdown, LaTeX, BibTeX)A
Read-onlyIdempotent

Read-only, idempotent bulk citation auditor that extracts all inline DOIs, PubMed PMIDs, arXiv IDs, and BibTeX @article{...} entries from a Markdown, LaTeX, BibTeX, or draft text block and verifies each concurrently (up to 6 parallel workers) against Crossref, DataCite, PubMed, OpenAlex, and arXiv. Returns a JSON report containing total_citations, verified_count, chimera_count (real identifier paired with mismatched BibTeX title/author/year), fabricated_count (unresolvable identifiers), retracted_count, integrity_score (0.0 to 100.0 percentage), per-citation results, and a human-readable summary. If no citations are present, returns total_citations: 0 and integrity_score: 100.0. When to use: use audit_document_citations to validate an entire manuscript, bibliography, or LLM response at once. For checking a single DOI/PMID/arXiv ID with specific claimed metadata, use verify_citation instead.

Inputs: text (required).

check_retractionCheck DOI Retraction Status in Crossref & OpenAlexA
Read-onlyIdempotent

Read-only, idempotent retraction scanner that queries both Crossref (update-to retraction/withdrawal notices and is-retracted-by relations) and OpenAlex (is_retracted flag) for a given DOI. A DOI is flagged as retracted if either Crossref or OpenAlex reports a retraction. Returns a JSON object with doi (normalized), exists (bool), title (string, if found), is_retracted (bool), status ('RETRACTED', 'ACTIVE', or 'NOT_FOUND' when the DOI does not exist in either registry), notices (array of notice labels), and message. When to use: use check_retraction for a fast, targeted retraction check on a specific DOI without full BibTeX generation or chimera metadata comparison. Use verify_citation instead for full citation verification, or audit_document_citations to scan an entire document.

Inputs: doi (required).

generate_bibtexGenerate Normalized BibTeX from DOIs, PMIDs, or arXiv IDsA
Read-onlyIdempotent

Read-only, idempotent batch formatter that resolves an array of DOIs, PubMed PMIDs, or arXiv IDs in input order against Crossref, DataCite, PubMed, and arXiv and formats each into a deterministic @article{...} BibTeX entry (authorSurnameYearFirstword key). Partial failures never abort the batch: unresolvable identifiers are omitted from the bibtex string and listed in the failed array. Returns a JSON object with resolved_count (int), failed (array of unresolved identifier strings), and bibtex (newline-separated BibTeX blocks). When to use: use generate_bibtex when you already have one or more known DOIs/PMIDs/arXiv IDs and only need clean BibTeX output. Use verify_citation instead if you need chimera title/author/year mismatch checking.

Inputs: identifiers (required).

search_verified_literatureSearch Registry-Verified Scientific LiteratureA
Read-onlyIdempotent

Read-only, idempotent literature discovery tool that queries OpenAlex, Crossref, PubMed (NCBI), and arXiv (no API key required) to find real, peer-reviewed articles and preprints matching a scientific query. Returns a JSON object with query, count, and results (ordered by registry relevance), where each item includes registry, title, authors, year, journal, doi, url, open_access_url, citation_count, is_retracted, plus ready-to-paste bibtex and apa strings. Network or upstream timeouts degrade gracefully by returning results from available registries. When to use: call search_verified_literature BEFORE writing citations on a topic so every cited paper has a verified identifier. Do not use this tool to validate an existing DOI/PMID (use verify_citation instead) or to format known identifiers into BibTeX (use generate_bibtex instead).

Inputs: query (required), limit, source.

verify_citationVerify Single Scientific Citation & Detect Chimera HallucinationsA
Read-onlyIdempotent

Read-only, idempotent verification of a single scientific citation (DOI, PubMed PMID, arXiv ID, or paper title) against Crossref, DataCite/Zenodo, PubMed (NCBI), OpenAlex, and arXiv (no API key required). Detects fabricated identifiers (HTTP 404 in all registries), chimera metadata mismatches (where a real DOI is paired with an incorrect or hallucinated title, author surname, or publication year), and retracted papers. Returns a JSON object with verified (bool), verdict ('VERIFIED', 'CHIMERA_MISMATCH', 'RETRACTED', or 'FABRICATED_OR_UNRESOLVED'), registry, canonical record metadata, checks, issues, bibtex, and apa. When to use: use verify_citation to validate a single reference and its claimed title/author/year. Use audit_document_citations instead to scan a full document containing multiple citations; use check_retraction for a fast retraction-only check on a known DOI; use search_verified_literature to discover papers before writing citations.

Inputs: identifier_or_query (required), claimed_year, claimed_title, claimed_author.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 5 tools

    Disambiguation4/5

    Each tool has a clearly stated primary role, and the descriptions explicitly route between single verification, bulk auditing, discovery, formatting, and retraction checks. However, verify_citation overlaps functionally with generate_bibtex and check_retraction because it also emits BibTeX/APA and detects retractions, so an agent could sometimes substitute the broader tool for the specialized ones.

    Naming Consistency5/5

    All five tools use snake_case verb_noun naming with a consistent action-first pattern: verify_citation, audit_document_citations, search_verified_literature, generate_bibtex, check_retraction. The one slight variation, search_verified_literature, remains readable and consistent with the overall convention.

    Tool Count5/5

    Five tools is well-scoped for a citation-integrity server, with each tool covering a distinct workflow stage: discovery, single verification, bulk audit, formatting, and retraction checking. There are no obvious filler tools or missing high-level operations that would require a sixth tool.

    Completeness5/5

    The toolset covers the full citation lifecycle: discovering real literature, verifying individual citations and metadata, auditing entire documents, generating BibTeX, and checking retractions. No major workflow dead ends are apparent for the stated domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      The ArXiv MCP Server bridges the gap between AI models and academic research by providing a sophisticated interface to arXiv's extensive research repository. This server enables AI assistants to perform precise paper searches and access full paper content, enhancing their ability to engage with scientific literature.
      19
      22,222 PyPI
      3,291
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      A local MCP server for searching scientific papers, retrieving metadata and abstracts, and legally downloading Open Access PDFs via OpenAlex, CrossRef, and Unpaywall APIs.
      5
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that verifies the existence, metadata accuracy, and claim support of academic citations by querying sources like OpenAlex, Crossref, and arXiv, enabling AI agents to fact-check references.
      7
      26 PyPI
      2
      MIT