docutruth-mcp
v0.1.2Verify legal citations with DocuTruth from inside an AI assistant (MCP connector)
Check the citations in a brief without leaving your assistant. Ask it to verify a PDF on your machine; the connector uploads it to DocuTruth, the server runs the real verification pipeline, and the flagged citations come back in the conversation. It checks a PDF on your computer. It will refuse pasted text, and that refusal is the honest answer rather than a limitation: an assistant that has summarised or reformatted a brief has already destroyed the exact wording and page numbers that quotation and pinpoint checks depend on.
Summary extracted from the README.
DocuTruth MCP connector
Check the citations in a brief without leaving your assistant. Ask it to verify a PDF on your machine; the connector uploads it to DocuTruth, the server runs the real verification pipeline, and the flagged citations come back in the conversation.
What it can and cannot check
It checks a PDF on your computer. It will refuse pasted text, and that refusal is the honest answer rather than a limitation: an assistant that has summarised or reformatted a brief has already destroyed the exact wording and page numbers that quotation and pinpoint checks depend on.
Flags are prompts to check a citation, not findings of fact. On the public LePhantomCite benchmark DocuTruth runs at roughly 65% precision and 63% recall per citation — so about one flag in three is wrong, and it misses about a third of real errors. Verify each flag against the opinion before relying on it, and do not treat an unflagged citation as confirmed. The connector repeats this with every set of results.
Not flagged is not the same as checked. Some citations cannot be
checked at all: a lookup times out, or the case is published only on Westlaw
or LEXIS. The connector lists those separately as not_checked, with the
reason, so they are not mistaken for citations that passed.
Verification takes 60–90 seconds at minimum, several minutes for a long brief. It cannot finish inside a single tool call, so the flow is submit → check back. The finished report is also emailed, which is usually the easier way to receive it.
Install
You need Python 3.10+. The connector has two dependencies (mcp, httpx);
it does not install any part of the DocuTruth server.
pip install docutruth-mcp
Get an API key
Sign in at https://docutruth.ai, go to Settings → API keys, and create one. Copy it immediately — it is shown once and never again, because the server stores only a hash of it. If you lose it, revoke it and make another.
A key carries the same access your login does. Treat it like a password, and revoke it from the same page if a machine is lost.
Configure your assistant
Claude Desktop — claude_desktop_config.json:
{
"mcpServers": {
"docutruth": {
"command": "docutruth-mcp",
"env": {
"DOCUTRUTH_API_KEY": "dt_sk_your_key_here"
}
}
}
}
Claude Code — add it with:
claude mcp add docutruth --env DOCUTRUTH_API_KEY=dt_sk_your_key_here -- docutruth-mcp
If docutruth-mcp is not on your PATH, use the full path to the executable
(inside your virtualenv's bin/ or Scripts/), or
"command": "python", "args": ["-m", "docutruth_mcp.server"].
Restart the assistant after editing its config.
Settings
| Variable | Default | Purpose |
|---|---|---|
DOCUTRUTH_API_KEY |
— | Required. Issued in the web app. |
DOCUTRUTH_API_URL |
https://api.docutruth.ai |
The API. |
DOCUTRUTH_APP_URL |
https://docutruth.ai |
Where report links point. |
⚠️ The API and the web app are different hosts. Pointing
DOCUTRUTH_API_URL at https://docutruth.ai makes every call hit the web
app and fail; the connector detects that specific mistake and says so.
Tools
| Tool | Does |
|---|---|
submit_document |
Sends a PDF. Returns a job id immediately. |
check_job |
Progress; yields a document id when finished. |
get_findings |
Flagged citations, citations that could not be checked, and the accuracy caveat. |
list_recent_documents |
Recently verified documents on the account. |
Using it
Check the citations in ~/briefs/appellant-brief.pdf
The assistant calls submit_document, waits, then get_findings. A typical
answer names the flagged citations, their pages, and which check fired —
existence, quotation, pinpoint, or whether the cited opinion appears to
support the claim.
Troubleshooting
"No API key configured" — DOCUTRUTH_API_KEY is not reaching the
process. It belongs in the env block of the assistant's MCP config, not
your shell profile; restart the assistant after editing.
"DocuTruth rejected the API key" — revoked, or a different key than you think. Issue a new one under Settings → API keys at https://docutruth.ai/settings.
"answered with a web page, not the API" — DOCUTRUTH_API_URL points at
the web app. Remove the override, or set it to https://api.docutruth.ai.
"is not a PDF" — export a .docx to PDF first. Pasted text cannot be
checked for quotations or pin cites.