docverity
MCP server that enables coding agents to check documentation claims against source code, detecting drift and suggesting fixes.
README
Docverity
AI made documentation rot an epidemic.

Code changes by the hour, and AI assistants only make it faster. Documentation does not keep up. Docverity reads your documentation, extracts the concrete claims it makes about the codebase, and checks each one against the source. Drift becomes a failing check in CI, the same way a broken test would.
Tools like doctest and mdbook test run the code blocks embedded in your
docs. Docverity verifies the prose around them: the flags, options, environment
variables, paths, and behavior your documentation describes are checked against
what the code actually does.
Three checks
Docverity runs three complementary checks:
- Reference checker — deterministic, no API key, instant. Catches docs that mention files, CLI flags, environment variables, or symbols that no longer exist anywhere in the source.
- Claim verifier — LLM-backed, catches prose-level semantic drift: "the
default timeout is 30s", "this returns a list", "set
FOO=barto enable X". Runs whenANTHROPIC_API_KEY(orANTHROPIC_AUTH_TOKEN) is set. - Coverage — the reverse direction: flags and environment variables the code uses that the docs never mention. On by default, reported as warnings.
Works free out of the box. Gets smarter with a key.
Every finding has a severity: error (a reader acts on it and gets burned)
or warning (real but not blocking). By default only errors fail the build, so
a slight issue is reported without breaking CI. Tune it with --fail-on.
Install
npm install -g docverity
Or run without installing:
npx docverity
Usage
From your repo root:
docverity
By default it checks README.md and every .md file under docs/. Pass files
explicitly to narrow the scope, and use -C to point at another root:
docverity -C path/to/repo
Skip the LLM engine for a fast, deterministic-only run:
docverity --no-llm
Options
| Flag | Description |
|---|---|
-C, --root <dir> |
Repo root to check (default: current directory). |
--no-llm |
Deterministic checks only; no API calls. |
--model <id> |
Model for the LLM engine (default claude-opus-4-8). |
--no-coverage |
Skip the code-to-docs check for undocumented flags/env vars. |
--fail-confidence <n> |
Minimum confidence (0..1) to report a finding. Default 0.7. |
--fail-on <level> |
Lowest severity that fails the build: error (default), warning, info, or none. |
--strict |
Also fail on unverifiable claims. |
--format <fmt> |
pretty (default), json, or github. |
Docverity fails CI the way a linter would. Exit codes: 0 clean (or warnings
only), 1 a finding at or above --fail-on severity, 2 a configuration error
(e.g. an invalid --fail-confidence/--fail-on or a missing doc file) so a
typo can never mask real drift with a green build.
In CI (GitHub Actions)
name: docs
on: [pull_request]
jobs:
docverity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npx docverity --format github
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
With --format github, drifted claims appear as inline annotations on the
changed lines of the pull request.
Use it from an agent (MCP)
Docverity ships an MCP server so a coding agent can check docs as a tool and fix drift in the same turn it changed the code. Add it to your MCP client:
{
"mcpServers": {
"docverity": {
"command": "npx",
"args": ["docverity", "mcp"]
}
}
}
This exposes one tool, check_docs, which returns each drifted claim with its
file, line, the stale text, code evidence, a confidence score, and a suggested
fix the agent can apply directly. It runs the deterministic engine by default
(fast, free, no key); pass llm: true to also verify prose claims.
A SKILL.md is included so the agent knows when to reach for it
(after editing code, before a release, when asked whether the docs are correct).
How it works
- Extract — parse each doc into atomic claims (a flag, a path, an env var, a symbol, or a prose assertion).
- Locate — search the source tree (via ripgrep when available) for evidence of each claim. Documentation files are excluded from evidence: a claim must be backed by code, not by the docs restating it.
- Verify — the reference engine checks for hard evidence; the LLM engine judges prose claims against the located evidence and returns ok / drifted / unverifiable with a specific reason.
- Report — pretty output, machine-readable JSON, or GitHub annotations.
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。