Documenting a repository top-down produces a summary of filenames; starting at the leaves and carrying child documentation upward produces an overview grounded in what the code actually does. Budget for it — a model call per qualifying directory against your own OpenRouter key adds up on a large tree, and the file-size and files-per-directory caps exist to keep that bounded.
An MCP server that documents a codebase by traversal rather than by prompt. It starts at leaf directories and works upward, writing a file at each level and folding child output into the parent, so the top-level overview is built from what was actually written below it.
- Documentation generated for a repository, written as `documentation.md` at each qualifying directory — `generate_documentation`
- Test plans with test types, edge cases and mock requirements, written as `testplan.md` — `autotestplan`
- A senior-developer-level code review focused on security, best practices and improvements, written as `review.md` — `autoreview`
- All three take the same arguments: `path`, an optional `openRouterApiKey`, an optional `model`, and `updateExisting` which defaults to true
- Directory handling that avoids noise — `.gitignore` patterns respected, single-file directories skipped but their content folded into the parent, and fallback files created for directories that exceed limits
- Progress reporting during long runs so the call does not look stalled
- Prompts kept in one place — `src/prompt-config.ts` — so tone and project-specific instructions can be changed without touching tool code
An OpenRouter API key, set as `OPENROUTER_API_KEY` — it calls a model per directory, so this is a metered operation. Node.js v16 or newer. Clone, `npm install`, `npm run build`, then point the client at `build/index.js` with `node`. Tuning is by environment variable: `OPENROUTER_MODEL` (default `anthropic/claude-3-7-sonnet`), `MAX_FILE_SIZE_KB` (default 100) and `MAX_FILES_PER_DIR` (default 20).
