autodocument
Autodocument MCP Server is a tool for automatically generating comprehensive documentation, test plans, and code reviews for code repositories using AI via the OpenRouter API. It offers features like smart directory analysis, Git integration, and modular architecture to facilitate extensibility.
Autodocument MCP Server
An MCP server that automatically generates documentation for code repositories by analyzing directory structures and code files using OpenRouter API.
Features
- Smart Directory Analysis: Recursively analyzes directories and files.
- Git Integration: Respects
.gitignore
patterns. - AI-Powered Documentation: Uses OpenRouter API to generate documentation.
- Test Plan Generation: Creates test plans with suitable test types and cases.
- Code Review: Performs senior developer-level code reviews.
- Intelligent File Handling: Manages file creation and updates.
Installation
- Prerequisites: Node.js (v16+), OpenRouter API key.
Configuration
Configure using environment variables, command-line arguments, or an MCP configuration file.
Using with Roo or Cline
Clone and build the repository. Configure the MCP server for Roo or Claude apps.
How It Works
Bottom-up approach: Discovery, Processing, File Analysis, Documentation Generation, Aggregation.
Architecture
Modular architecture with core components, analysis and OpenRouter modules, and more.
Example Usage
Via Command Line and Programmatic Usage.
Customizing Prompts
Edit src/prompt-config.ts
for prompt adjustments.
Available Tools
generate_documentation
Generates documentation for a code repository.
autotestplan
Generates test plans for a code repository.
autoreview
Provides a code review for a repository.
Output Files
documentation.md
,testplan.md
,review.md
filenames.- Fallback files like
undocumented.md
for exceeded limits cases.
Troubleshooting
Instructions for API key, Size Limit Errors, and Model Selection issues.
License
CC0-1.0 License - Public domain dedication by the U.S. Department of Energy.
Contributing
Contributions welcome. Guidelines provided for adding new tools.