CiteCheck MCP
CiteCheck MCP automates citation auditing, evidence verification, and safe manuscript rewriting for LaTeX/Markdown documents, delegating judgment to the host LLM.
Open and parse manuscripts: read
.texor.mdfiles (following\input/\include), parse citations, bibliography, and restore previous verdicts.List and inspect claims: browse cited sentences with statuses (supported, partial, contradicted, etc.), view raw LaTeX, context, and cited references.
Fetch and attach sources: locate PDFs via
.bibfile fields, local folders, Zotero, arXiv, Semantic Scholar, OpenAlex, Unpaywall; extract text with page numbers.Search and read evidence: run BM25 lexical search with number anchoring, read sources page by page or sequentially.
Verify quotes: check exact or fuzzy (90/100) presence of quotes in PDFs, tolerant to ligatures, hyphenation, and quotation marks.
Record verdicts: save verdicts only after verifying quotes verbatim; rejected if not found.
Find uncited claims: heuristic scan for factual sentences needing citations in English or Portuguese.
Check bibliography: detect missing keys, unused entries, duplicates, missing DOIs, metadata mismatches with Crossref, retractions, and preprints with published versions.
Propose rewrites and insertions: validate LaTeX syntax, citation keys, language; nothing written until approved.
Apply, revert, discard, or list rewrites: atomic write with encoding/line-ending preservation, backups, and diff listing.
Export outputs: interactive HTML viewer with colored citations and PDF snippets, annotated LaTeX (notes or comments mode), and static HTML report in English or Portuguese.
Track audit progress: view claims, sources, and rewrites per status.
Locates and fetches PDFs from arXiv so cited sources can be attached and checked during manuscript auditing.
Uses the Semantic Scholar API to search for PDFs and to detect preprints that have a published version, improving source discovery and citation verification.
Reads the local Zotero attachment storage folder to locate PDFs for cited sources and attach them for verification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CiteCheck MCP audit citations in chapter 2 of ~/tese/main.tex and show only problems"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CiteCheck MCP
Servidor MCP que confere cada citação de um manuscrito (LaTeX ou Markdown, em português ou inglês) contra o
trecho correspondente na fonte citada. Ele também sugere reescritas e as aplica no .tex com validação e backup.
O servidor não chama nenhuma API de LLM. O trabalho determinístico fica com ele:
parsing do LaTeX e do BibTeX;
busca e extração dos PDFs;
busca lexical;
verificação literal das citações;
checagem da bibliografia;
edição segura dos arquivos.
O julgamento (se o trecho sustenta a afirmação, como reescrever a frase) fica com o modelo do cliente que você já usa (Claude Code ou Claude Desktop), dentro da sua assinatura.
manuscrito.tex ─► frases + \cite ─► .bib ─► PDFs (pasta local, Zotero, arXiv, OA) ─► texto com página
│
relatório HTML ◄── veredito (com citação literal verificada) ◄── modelo do host ◄── busca BM25Instalação
Requer o uv (brew install uv), que já instala o Python 3.12.
git clone https://github.com/lucasgris/citecheck.git
cd citecheck
uv sync
uv run pytest # 20 testes, offlineClaude Code
claude mcp add citecheck -s user -- uv run --directory /caminho/para/citecheck citecheck-mcpClaude Desktop
Em ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"citecheck": {
"command": "/opt/homebrew/bin/uv",
"args": ["run", "--directory", "/caminho/para/citecheck", "citecheck-mcp"],
"env": { "CITECHECK_EMAIL": "seu@email" }
}
}
}Use em command o caminho que which uv mostra na sua máquina.
Variáveis de ambiente (todas opcionais)
Variável | Para quê |
| Entra no "polite pool" do Crossref e habilita o Unpaywall (mais PDFs de acesso aberto). |
| Sem a chave, o Semantic Scholar costuma responder 429. A chave é gratuita e melhora a detecção de "preprint com versão publicada" e a busca de PDFs. |
| Pasta de anexos do Zotero (padrão |
| Abre um manuscrito automaticamente ao iniciar. |
Related MCP server: io.github.Hylouis233/bibverify
Uso
No Claude Code, peça em linguagem natural ou use os prompts prontos:
/mcp__citecheck__auditcom o caminho domain.tex: faz a auditoria completa e gera o relatório./mcp__citecheck__rewrite: sugere reescritas para as afirmações com problema, emptouen, mostra o diff e só aplica depois que você aprovar./mcp__citecheck__write_with_evidence: redige um parágrafo usando apenas trechos verificados das fontes escolhidas e o insere no.tex.
Exemplos de pedidos:
Audita as citações do capítulo 2 de ~/tese/main.tex e me mostra só os problemas.
Reescreve em inglês as frases marcadas como "partial", mantendo os \cite.
Para revisar o resultado:
Gera o visualizador e abre no navegador.
Gera o LaTeX anotado só com os problemas e compila.
O visualizador fica em .citecheck/viewer.html. O LaTeX anotado fica em .citecheck/annotated/, uma cópia do
projeto em que os demais arquivos (figuras, .bib, classes) entram como links simbólicos. Ela compila igual ao
original (latexmk -pdf main.tex dentro da pasta).
Todo o estado fica em .citecheck/, ao lado do manuscrito: SQLite, cache dos PDFs, backups e report.html.
Essa pasta tem um .gitignore próprio, porque PDFs de terceiros não devem ir para o repositório.
Ferramentas
Ferramenta | O que faz |
| Lê o manuscrito (segue |
| Lista as frases citadas com o status; mostra o detalhe com o LaTeX bruto e o contexto. |
| Localiza os PDFs (campo |
| Busca BM25 com números como âncora; leitura por página. |
| Confere se o trecho está literalmente no PDF (tolerante a ligaduras, hifenização e aspas). |
| Grava o veredito; rejeita citações que não estão no PDF. |
| Encontra frases que parecem precisar de citação (heurística EN/PT). |
| Chaves ausentes, entradas não usadas, duplicatas, DOI ausente (com sugestão), metadados divergentes do Crossref, retratações e preprint com versão publicada. |
| Valida a reescrita ( |
| Escrita atômica que preserva a codificação (UTF-8 ou latin-1) e o CRLF, com backup. |
| Visualizador HTML interativo: o manuscrito com as citações coloridas por veredito; ao clicar, aparecem a referência, a justificativa, os trechos e o recorte da página do PDF com o trecho grifado. |
| Cópia anotada do projeto LaTeX (os originais não mudam). Modo |
| Relatório HTML estático (pt/en) com vereditos, trechos e páginas. |
| Progresso da auditoria. |
Suporte a LaTeX
Funciona bem via MCP, porque o servidor lê e escreve os arquivos .tex direto no disco:
\cite,\citep,\citet,\parencite,\textcite,\autocite,\cites{a}{b}e variantes com*e argumentos opcionais;\nocite;thebibliography/\bibitem;\bibliographye\addbibresource.Ignora comentários, o preâmbulo, equações, tabelas,
verbatime afins; trata legendas e\itemcomo unidades separadas.Converte acentos LaTeX (
\c{c},\~a,{\'e}) para comparar o texto, mas escreve de volta exatamente o que foi aprovado. Avisa quando a reescrita usa acentos Unicode num arquivo que usa macros.Não compila o documento. Para conferir a compilação depois de aplicar reescritas, rode
latexmk.
Limitações conhecidas
PDFs escaneados não têm camada de texto. Rode
ocrmypdfantes.Tabelas e figuras são extraídas como texto corrido; afirmações sustentadas só por uma figura precisam de verificação manual.
A busca é lexical. Para uma afirmação em português e uma fonte em inglês, o modelo passa os termos em inglês em
query(os prompts já instruem isso). Os números servem de âncora entre idiomas.Ainda não lê
.docx(é o próximo formato a suportar).
Licença
MIT. Veja LICENSE.
Available Tools
19 toolsapply_rewriteA
Write a proposed rewrite into the manuscript file (atomic write, original encoding and line endings kept, backup in .citecheck/backups). Only call after the user approved the diff.
Inputs: rewrite_id (required).
attach_pdfA
Attach a local PDF to a reference (for paywalled papers or to replace a wrong match).
Inputs: key (required), pdf_path (required).
audit_statusB
Progress overview: claims per status, sources per status, rewrites per status.
Inputs: no named parameters.
check_bibliographyB
Check the bibliography: cited keys missing from the .bib, unused entries, duplicates, missing DOIs, metadata that differs from Crossref, retractions/corrections, preprints that have a published version.
Inputs: keys, online.
discard_rewriteC
Discard a proposed (not applied) rewrite.
Inputs: rewrite_id (required).
export_reportC
Write a self-contained HTML report with every claim, verdict, verified quote (with page), rewrite and bibliography problem.
Inputs: path, language.
fetch_sourcesA
Locate the PDF of each cited reference (bib file field, PDF folders, Zotero storage, then open-access
repositories), extract its text with page numbers and index it. Reports missing/paywalled sources and
PDFs whose title does not match the reference.
Inputs: keys, download.
find_evidenceA
Rank the source's sentences by relevance to the claim (BM25 + number matching). Each hit has the exact text, page and surrounding context; copy quotes verbatim from here.
Inputs: key (required), k, query, claim_id, +1 more.
get_claimB
Full detail for one claim: plain text, raw LaTeX, neighbouring sentences, cited references (with source availability) and existing verdicts.
Inputs: claim_id (required), context.
list_claimsC
List cited sentences ('claims') with their keys, location and verification status (paginated).
Inputs: file, limit, offset, status, +2 more.
list_rewritesC
List rewrites with their diffs.
Inputs: status. Returns: result
open_projectA
Open (or re-open after edits) a manuscript. Parses sentences, citations, the bibliography and restores previous verdicts. Returns an overview: language, counts, keys missing from the .bib.
Inputs: manuscript (required), bib, pdf_dirs.
propose_insertionB
Propose new text after an existing sentence (e.g. a paragraph drafted from verified evidence). Applied with apply_rewrite like any rewrite.
Inputs: new_text (required), after_claim_id (required), note, language.
propose_rewriteA
Propose a replacement for one sentence. Validates LaTeX (braces, $, special chars), citation keys (none lost, all new ones in the .bib) and language. Nothing is written until apply_rewrite.
Inputs: claim_id (required), new_text (required), note, language, +1 more.
read_sourceB
Read a source page by page (or from a sentence id), e.g. the abstract, or around a search hit.
Inputs: key (required), page, from_sentence, max_sentences.
record_verdictA
Record the verdict for one (claim, key) pair. Every quote is verified against the PDF first; the verdict is rejected if any quote is not verbatim.
Inputs: key (required), verdict (required), claim_id (required), rationale (required), +3 more.
revert_rewriteC
Undo an applied rewrite.
Inputs: rewrite_id (required).
scan_uncitedB
Find sentences without citations that look like factual claims needing one (numbers, comparisons, 'studies show'-style wording in EN/PT). Heuristic: the host must judge each candidate.
Inputs: file, limit.
verify_quoteB
Check that a quote is really in the source (fuzzy-tolerant to PDF artifacts, threshold 90/100). Returns the page and the exact source passage.
Inputs: key (required), quote (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool has a clearly distinct role: verify_quote checks, find_evidence ranks, and record_verdict persists, while read_source, open_project, fetch_sources, and attach_pdf all target different resource stages. The rewrite lifecycle (propose_rewrite, propose_insertion, apply_rewrite, revert_rewrite, discard_rewrite, list_rewrites) is also cleanly separated by action.
Every tool follows a consistent verb_noun snake_case pattern (verify_quote, open_project, list_claims, apply_rewrite, etc.). There are no mixed conventions or vague verbs; even the rewrite variants follow a predictable propose/apply/revert/discard/list scheme.
19 tools is on the heavy side of the ideal 3-15 range, but the domain (citation checking of a manuscript) is genuinely multi-stage and each tool earns its place. No redundant tools inflate the count.
The surface covers the full workflow: opening a project, listing/getting claims, verifying and recording verdicts, bibliography checks, source fetching, rewrite proposal through rollback, and report export. Minor gaps like closing/archiving a project or a search-within-bibliography helper exist but are workable.
Related MCP Connectors
Checks AI-written references against Crossref, PubMed and OpenAlex. Formats citations, PRISMA.
Check if references exist or were retracted, look up journal AI policies, and preview manuscripts.
Search your own PDF library and write LaTeX with every claim anchored to its source paragraph.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Related MCP Servers
- AlicenseAqualityBmaintenanceChecks every reference of a LaTeX paper against Crossref, dblp, arXiv, DataCite, PubMed and OpenAlex records: whether each cited work exists, whether its metadata matches, and whether it was retracted. Read-only tools confined to the workspace, with no LLM in the verdict.5105 PyPI183MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants and researchers to verify BibTeX entries against Crossref, OpenAlex, PubMed, arXiv and other sources using identifier-first, explainable multi-signal matching. It reports metadata consistency, conflicts, and ambiguous or missing records, and can apply high-confidence field updates non-destructively with backups.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to check BibTeX records for bibliographic existence and metadata consistency by querying identifier-first providers like Crossref, OpenAlex, PubMed, DBLP, and arXiv and scoring title, author, year, venue, and page evidence. It returns explainable outcomes such as matches, ambiguous or not-found entries, and identifier conflicts, while keeping edits non-destructive unless explicitly applied.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to verify bibliographic records and BibTeX metadata consistency by resolving DOI, PMID, PMCID, and arXiv identifiers and scoring candidates across multiple scholarly sources with explainable, multi-signal matching. It reports structured provider outcomes and metadata conflicts without destructively editing the source bibliography.-