# DocGuard

Detects drift between repository code and project documentation, keeping specifications accurate for coding agents.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 32
- Author: raccioly
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/raccioly/docguard
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/docguard

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add docguard -- npx -y docguard-cli
```

### Codex

**Platform CLI**
```bash
codex mcp add docguard -- npx -y docguard-cli
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "docguard": {
            "command": "npx",
            "args": [
                "-y",
                "docguard-cli"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "docguard": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "docguard-cli"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add docguard npx -y docguard-cli
```

## When to use it
- 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
- 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.

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44874
- [Sui Knowledge Base (kapa.ai)](https://affpapa.org/en/nevibecode/mcp/sui-knowledge-base-kapaai.md) — MCP server · ★ 7784
- [Claude Code Ultimate Guide](https://affpapa.org/en/nevibecode/mcp/claude-code-ultimate-guide.md) — MCP server · ★ 6237
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5548
- [RevoGrid DataGrid MCP Pro](https://affpapa.org/en/nevibecode/mcp/revogrid-datagrid-mcp-pro.md) — MCP server · ★ 3450
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/codeaashu-claude-code-explorer-mcp.md) — MCP server · ★ 3409

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
