DocGuard — Claude Code MCP server: what it does, how to install
Detects drift between repository code and project documentation, keeping specifications accurate for coding agents.
claude mcp add docguard -- npx -y docguard-cliWhat DocGuard does
DocGuard compares statements in project documentation against actual code evidence in the repository. Its architecture relies on 34 deterministic validators and 4 scanners for routes, schemas, documentation tools, and Spec Kit artifacts. Scoring runs across 8 distinct categories, producing structured output for terminal inspection or JSON parsing.
AI agents receive structured prompts and clear diagnostic findings to resolve drifted specifications. Teams can verify explicit statements using the .docguard-evidence.json file. Anything unverified remains explicitly marked, so you can control enforcement strictness.
Running docguard-cli requires Node.js version 18 or newer.
What it helps with
- detect divergence between documentation and source code
- validate GitHub Spec Kit specification artifacts
- produce agent-ready fix prompts for out-of-date docs
- track verified claims locally with
.docguard-evidence.json
Example prompts for the agent
- Run DocGuard to check whether the documentation matches our current code.
- Inspect project specifications and generate an enforcement maturity score.
- Diagnose doc drift and prepare prompt tasks to fix obsolete sections.
How to install DocGuard
Platform CLI
claude mcp add docguard -- npx -y docguard-cliPlatform CLI
codex mcp add docguard -- npx -y docguard-cliConfig file
{
"mcpServers": {
"docguard": {
"command": "npx",
"args": [
"-y",
"docguard-cli"
]
}
}
}Config file
{
"servers": {
"docguard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"docguard-cli"
]
}
}
}Platform CLI
gemini mcp add docguard npx -y docguard-cliStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about DocGuard
How to install DocGuard in Claude Code?
Run claude mcp add docguard -- npx -y docguard-cli in your terminal. This registers the server using stdio.
What does DocGuard do?
It checks documentation against codebase evidence, scores specification maturity across 8 categories, and hands repair tasks to coding agents.
What are the system requirements for DocGuard?
You need Node.js 18 or higher. The tool runs via npx docguard-cli and relies on a single pinned runtime dependency.