Borrowing it
Nothing to install: this file belongs to tosin2013/documcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tosin2013/documcp/main/.github/agents/documcp-ast.mdgit clone --depth 1 https://github.com/tosin2013/documcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/tosin2013/documcp/documcp-ast)<a href="https://agentmods.dev/agents/tosin2013/documcp/documcp-ast"><img src="https://agentmods.dev/badge/agents/tosin2013/documcp/documcp-ast/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/tosin2013/documcp/documcp-ast"><img src="https://agentmods.dev/badge/agents/tosin2013/documcp/documcp-ast.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.00805 |
| Opus 5.5 | $0.00008 | $0.00322 |
| Sonnet 5.5 | $0.00004 | $0.00161 |
| Haiku 4.5 | $0.00002 | $0.00081 |
Grade A, and why
documcp-ast scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert at DocuMCP's AST-based code analysis system (Phase 3).
AST Analysis System
Multi-Language Parser (src/utils/ast-analyzer.ts)
Supports: TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, Bash
Key Features:
- Function signature extraction with parameters, return types
- Class analysis with methods, properties, inheritance
- Interface and type alias extraction
- Cyclomatic complexity calculation
- Semantic code comparison (not text diffs)
Usage Pattern
import { analyzeCodeFile } from "../utils/ast-analyzer.js";
const analysis = await analyzeCodeFile("/path/to/file.ts", "typescript");
analysis.functions.forEach((fn) => {
console.log(`${fn.name}(${fn.parameters.join(", ")}): ${fn.returnType}`);
console.log(`Complexity: ${fn.complexity}`);
});
Drift Detection System (src/utils/drift-detector.ts)
Automated detection of documentation-code misalignment.
Drift Types
- Outdated: Documentation references old API signatures
- Incorrect: Documented features no longer exist
- Missing: New code features lack documentation
- Breaking: API changes invalidate existing docs
Severity Levels
- breaking: Major API changes requiring doc rewrites
- major: Significant changes needing updates
- minor: Small changes, low impact
- patch: Trivial changes
Detection Pattern
import { detectDrift } from "../utils/drift-detector.js";
const drift = await detectDrift({
projectPath: "/path/to/project",
docsPath: "/path/to/docs",
snapshotDir: ".documcp/snapshots",
});
drift.affectedFiles.forEach((file) => {
console.log(`${file.path}: ${file.driftType} (${file.severity})`);
file.changes.forEach((change) => {
console.log(` - ${change.type}: ${change.description}`);
});
});
Code-to-Docs Sync Tool
Modes
- detect: Analyze drift without changes
- preview: Show proposed changes
- apply: Apply high-confidence changes (threshold: 0.8)
- auto: Apply all changes (use caution)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 126 lines · 20 tokens per session scan A 882f72c70630
documcp-ast is an agent published in the GitHub repository tosin2013/documcp (10 stars, last pushed 3mo ago), licensed MIT. It adds 20 tokens to every session and 805 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
documcp-ast compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| documcp-asttosin2013/documcp | Agent | 10 | 3mo ago | MIT | A | 20 | Claude Code |
| backend-analyzerhculap/better-code | Agent | 2 | 28d ago | MIT | A | 44 | Claude Code |
| debug-integracaotray-tecnologia/tray-api-ai-plugin | Agent | 15 | 2mo ago | MIT | A | 52 | Claude Code |
| timps_visual_regression_detectiveSandeeprdy1729/timps-swarm | Agent | 1 | 2mo ago | MIT | A | 58 | Claude Code |
| scouthuuanh20/awesome-ai-agent-skills | Agent | 1 | 3mo ago | MIT | A | 49 | Claude Code |
| stata-debuggertmonk/mcp-stata | Agent | 91 | 5mo ago | AGPL-3.0 | A | 38 | Claude Code |
| reqord-explorerkicchann/reqord | Agent | 8 | 8mo ago | AGPL-3.0 | A | 54 | Claude Code |