agenttruth-mcp
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., "@agenttruth-mcpcheck my instruction files for drift before this run"
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.
agenttruth
CI check that fails when CLAUDE.md / AGENTS.md / README stop matching the code they describe.
Your agents read your instruction files on every run. If those files lie, every run is wrong — and nothing tells you, because docs don't fail builds.
npx agenttruthagenttruth · 2 docs · 468 files indexed
8 drift findings in 1 file
README.md
878 missing-file references "policy.json" — no such file in repo
904 missing-file references "agent-browser.json" — no such file in repoExit code 1 — your CI fails. That's the point.
Why
The 2026 agent-tooling wave is very good at feeding agents context and very bad at checking that context is true. graphify, codegraph, archify, CLAUDE.md generators — dozens of projects building knowledge graphs and instruction files. Zero of them verify the output still matches the code. So an agent reads a stale CLAUDE.md and confidently does the wrong thing.
agenttruth is the missing half: the CI gate that fails on drift.
Related MCP server: tamperlens-mcp
Install
npx agenttruth # scan the current repo
npm i -D agenttruth # or add to devDependenciesRequires Node 18+. Zero runtime dependencies.
Checks
numeric-claim — a count in your docs that the code contradicts.
README: "covered by a 299-check behavior harness" → repo has 266 assertions.
Counters are matched by kind, so a test count is never compared to an agent count. Only typo-sized differences are flagged (a stale count from an older commit), never unrelated numbers. Helper declarations (function check()) are excluded.
missing-file — docs name a file the repo doesn't ship.
CONTRIBUTING: "see
e2e_mcp.rsfor the integration harness" → file does not exist.
It stays quiet on the things that aren't drift: badge URLs, CLAUDE.md files you tell people not to use, files a CLI command expects the user to supply (--params @input.json), submodule paths, and anything inside a fenced code block.
broken-link — a relative markdown link that resolves to nothing.
README: "see the Authentication docs" → file does not exist.
Also catches directory links with no index and anchors with no matching heading. Absolute http(s) links are skipped on purpose — verifying them would make CI depend on the network.
missing-command — docs tell you to run a build tool the repo doesn't have.
README: "make test" → no
Makefile,makefile,GNUmakefile,Justfile, orjustfile.
Only counts commands in shell-fenced blocks, $-prefixed lines, or indented snippets. Prose like "installation via npm is deprecated" or "a fix that doesn't make sense" is never flagged.
Auto-fix
npx agenttruth --fixRewrites stale counts to the measured value. Only unambiguous ones — if two files claim to hold "the agent catalog" and disagree, it refuses rather than guesses, because a wrong number in a README is worse than a stale one.
CI
- uses: hemv-857/agenttruth@v1Or run it directly:
- run: npx agenttruthAdopting without breaking your build
A repo that has been drifting for a year cannot adopt a checker that fails on day one — nobody reads 40 findings, everyone uninstalls. Baseline the existing findings, then CI fails only on new drift, which is the only thing anyone can act on:
npx agenttruth --update-baseline # commit .agenttruth-baseline.jsonFix what you can, then re-baseline. Fingerprints ignore line numbers, so unrelated edits won't resurrect a suppressed finding.
Config (optional)
agenttruth.config.json — every field has a working default:
{
"docs": ["README.md", "CLAUDE.md", "AGENTS.md"],
"docsDir": "docs",
"checks": ["numeric-claim", "missing-file", "broken-link", "missing-command"],
"ignore": ["CHANGELOG.md"],
"driftTolerance": 0.25
}MCP
Agents can check their own instructions before a run:
{ "mcpServers": { "agenttruth": { "command": "npx", "args": ["-y", "agenttruth-mcp"] } } }Two tools: check_drift (findings with file and line) and list_agent_docs (what gets inspected). Zero dependencies — it speaks JSON-RPC over stdio directly.
Options
--dir <path> repo root (default: cwd)
--json machine-readable output
--fail-on <sev> error | any | none (default: any) — exit threshold
--update-baseline record current findings as known
--fix rewrite unambiguous stale counts to the measured value
-q, --quiet print only when there are findingsHonest scope
Four checks (numeric-claim, missing-file, broken-link, missing-command), each tuned for low false positives over recall. It stays silent on anything it can't prove. It is tuned for low false positives over recall: on a sample of well-maintained repos it flags a handful of findings, and the ones we spot-checked are real drift. If it can't prove a file is wrong, it stays quiet.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Stop your agent before it runs rm -rf /etc or emails your .env. Deterministic preflight checks.
Enforces architectural invariants and code quality rules inside your AI agent's edit loop.
Checks CLAUDE.md, AGENTS.md or a system prompt for 12 safeguards unattended agents need.
Research-backed lint + generation for agent context files (CLAUDE.md, AGENTS.md) + prompt enhancer.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceValidates AGENTS.md files against the cross-vendor coding-agent spec, detecting security smells and consistency issues.MIT- AlicenseAqualityAmaintenanceInspects documents for tampering, ineffective redactions, and text aimed at language models before they enter an agent's context, and compares documents to confirm whether they are unchanged.439 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to check human-stated assumptions against authoritative sources like AWS AppConfig, Sentry, and the repository, detecting when beliefs have drifted from reality. It provides tools to inspect belief history, list verifiable properties, review open drifts, and record verified understanding.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables any MCP client to detect Claude Code configuration that is silently ignored, such as agent files that fail to load, unknown frontmatter fields, parent-folder settings, conflicting MCP server entries and drift since a baseline. Exposes read-only tools that return findings with exact edits, the fix prompt, and explanations of each check, without modifying any files.Apache 2.0