citeguard
Checks whether a citation has been retracted, corrected, or flagged with an expression of concern by querying Crossref — including retractions that Crossref backfills from the Retraction Watch database, which publishers often never record in their own metadata. Lets an AI agent verify a DOI, or every DOI in a reference list, before using it in research or writing.
README
citeguard
Retracted papers get cited for years after retraction. Andrew Wakefield's fraudulent 1998 paper linking the MMR vaccine to autism — retracted in 2010 — has been cited well over a thousand times since its retraction, by researchers who had no easy way to know. A 2026 JMIR study found that freely available AI tools "cannot reliably flag retracted literature," right as AI-assisted research and writing has exploded. citeguard closes that gap: check a citation against Crossref — free, no API key — before it goes in a paper, a summary, or a review.
Three surfaces, one verified detection algorithm:
| Surface | For | Location |
|---|---|---|
| Python library + CLI | academic writers, scripts | src/citeguard/ |
| MCP server | AI agents doing research/writing | mcp-server/ |
| GitHub Action | CI on a lab's or journal's repo | action.yml |
Why this is built the way it is
The detection logic isn't guessed at from documentation — it was built by
querying Crossref's real API for known cases and reading the actual
response shapes, then writing tests against the saved real responses
(committed in tests/fixtures/, shared by both the Python and TypeScript
implementations). Two real papers anchor the ground truth:
- Wakefield et al., 1998, The Lancet
(the MMR-autism paper): the publisher's own Crossref metadata has no
structured retraction data — an
update-tocheck alone would silently miss it. What actually carries the signal is a separateupdated-byfield, where Crossref has backfilled the retraction (and an earlier 2004 correction) from the Retraction Watch database itself. Missing this field would have meant missing the single most famous retracted paper in medicine. - Mehra et al., 2020, The Lancet
(the Surgisphere-linked COVID/hydroxychloroquine paper): here the
publisher did attach structured data directly, via
update-to. A different field, a different provenance, same underlying fact. - Watson & Crick, 1953, Nature serves as the clean control in every test suite — a definitely-real, definitely-not-retracted paper that must never be flagged.
So the checker looks at three independent signals, in order: update-to
(publisher-asserted), updated-by (often Retraction-Watch-sourced,
catching what publishers miss), and a title-prefix fallback
("RETRACTED:", "WITHDRAWN:", etc.) for older or unlinked cases with no
structured metadata on either field. Each signal is mapped to the right
severity — an "Expression of Concern:" title is not the same thing as a
retraction, and earlier versions of this code collapsing that distinction
was itself a bug caught by testing against real titles, not just
synthetic ones. See src/citeguard/analyze.py
for the fully-commented implementation.
Quick start
CLI:
pip install -e .
citeguard doi 10.1016/S0140-6736(97)11096-0
citeguard file references.bib --fail-on retracted # for CI, see below
MCP server (add to your client's config, e.g. .mcp.json):
{ "mcpServers": { "citeguard": { "command": "node", "args": ["/path/to/citeguard/mcp-server/dist/index.js"] } } }
GitHub Action (in another repo's workflow):
- uses: wedo911/citeguard@main
with:
path: references.bib
fail-on: concern # never | retracted | concern | corrected
What this is not
- Not proof a paper's content is correct. It only checks retraction status, not whether a non-retracted paper's findings hold up.
- Not exhaustive. The title-prefix heuristic only catches the publisher conventions it's been tested against; a clean result means "no known signal found," not "guaranteed never retracted."
- Not a bulk-scraping tool. It's built for the size of a real
bibliography (tens of citations), with a small fixed delay between
Crossref requests and an optional persistent cache
(
src/citeguard/cache.py) — good API citizenship for a free public service, not a tool for scanning millions of DOIs.
Running the tests
# Python (55 tests, including against the real fixtures above)
pip install -e ".[dev]" && pytest -v
# MCP server (17 tests against the same real fixtures)
cd mcp-server && npm install && npm run build && npm test
Both suites are network-free and deterministic — they run against the
committed real API responses, not live calls, so they're fast and don't
depend on Crossref being reachable. Live end-to-end behavior (the actual
CLI, the actual MCP tool, hitting the real API) was separately verified
by hand during development; the GitHub Action additionally has its own
CI job (action-smoke-test) that runs the real composite action against
a known-retracted and a known-clean bibliography on every push, so the
Action itself — not just the underlying library — is continuously
verified against the live API.
Contributing
New signal types, additional publisher title conventions, and
false-positive reports are all welcome. If you add a case, prefer adding
it as a real, cited Crossref fixture over a synthetic one where possible
— that's what caught the two real bugs this project's own test suite
found during development (a URL-encoding bug in the DOI request path, and
a BibTeX parser that could swallow an adjacent entry when parsing a
malformed @comment block).
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。