MCP Server for code documentation generation - multi-language support (PHP, TypeScript, JavaScript), codebase analysis, and multiple output formats
|
All checks were successful
Publish Package / publish (push) Successful in 25s
Complete refactor with comprehensive improvements: ✨ New Features: - 29 comprehensive unit tests with Vitest - 100% TypeScript type safety - Complete JSDoc documentation 🏗️ Architecture: - Modular structure (types, tool-definitions, handlers, docu-service, index) - Type-safe interfaces: CodeElement, CodebaseAnalysis, CommentBlock - index.ts: 193 → 82 lines (57% reduction) 🧪 Testing: - Type validation tests - Tool definition validation tests - Full test coverage 📦 Dependencies: - MCP SDK upgraded to 1.20.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
📚 docu-mcp
MCP Server for automatic documentation generation from code - featuring multi-language parsing, format support, and comprehensive testing.
What's New in v2.0.0
✨ Complete Refactor - Modular architecture with 57% code reduction
🧪 29 Unit Tests - Full test coverage with Vitest
🎯 100% Type Safety - Eliminated all any types
📚 Complete JSDoc - Comprehensive API documentation
📦 MCP SDK 1.20.0 - Latest SDK with improved capabilities
Features
Core Features
- 📊
analyze_codebase- Analyze codebase structure and extract code elements (classes, functions, methods) with documentation - 📝
generate_docs- Generate comprehensive documentation from codebase in multiple formats (Markdown, HTML, JSON) - ✍️
update_readme- Update or create a specific section in README.md with new content - 🔍
extract_comments- Extract all documentation comments and docblocks from source files
Advanced Features
- 🎨 Support for PHPDoc, JSDoc, TypeDoc
- 🚀 Framework-specific docs (Symfony, TYPO3)
- 📖 Multi-format export (Markdown, HTML, JSON)
- 🤖 AI-enhanced documentation improvements
- 📋 Template system for different doc types
Installation
npm install
npm run build
Configuration
Optional environment variables:
PROJECT_PATH- Default project pathDOC_FORMAT- Default output format (markdown, html, json)LLM_API_URL- LLM API URL for AI enhancements (optional)
Usage
npm start
Examples
Generate documentation
{
"tool": "generate_docs",
"arguments": {
"projectPath": "/path/to/project",
"outputFormat": "markdown"
}
}
Update README
{
"tool": "update_readme",
"arguments": {
"projectPath": "/path/to/project",
"section": "API",
"content": "## API\n\n..."
}
}
Analyze codebase
{
"tool": "analyze_codebase",
"arguments": {
"projectPath": "/path/to/project",
"languages": ["php", "typescript"]
}
}
Supported Languages
- PHP: PHPDoc parsing, class/method extraction
- TypeScript/JavaScript: JSDoc/TypeDoc parsing
- Python: Docstring parsing
- General: Comment extraction from any language
Documentation Formats
Markdown
Standard Markdown with code blocks and tables.
HTML
Styled HTML documentation with navigation.
JSON
Structured JSON for programmatic use.
License
MIT