MCP Server for code documentation generation - multi-language support (PHP, TypeScript, JavaScript), codebase analysis, and multiple output formats
Find a file
Jonas Hanisch 41222a1e45
All checks were successful
Publish Package / publish (push) Successful in 25s
Merge develop → main: Release v2.0.0
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>
2025-10-10 12:42:44 +02:00
.forgejo/workflows fix: use direct authentication token in CI workflow (v1.0.5) 2025-10-07 17:10:08 +02:00
src Refactor to v2.0.0: Modular architecture with comprehensive testing 2025-10-10 12:42:36 +02:00
.gitignore fix: registry configuration for scope-based installation (v1.0.1) 2025-10-07 12:33:58 +02:00
CHANGELOG.md Refactor to v2.0.0: Modular architecture with comprehensive testing 2025-10-10 12:42:36 +02:00
package-lock.json Refactor to v2.0.0: Modular architecture with comprehensive testing 2025-10-10 12:42:36 +02:00
package.json Refactor to v2.0.0: Modular architecture with comprehensive testing 2025-10-10 12:42:36 +02:00
README.md Refactor to v2.0.0: Modular architecture with comprehensive testing 2025-10-10 12:42:36 +02:00
tsconfig.json Implement Documentation MCP Server with code analysis 2025-10-07 11:13:58 +02:00
vitest.config.ts Refactor to v2.0.0: Modular architecture with comprehensive testing 2025-10-10 12:42:36 +02:00

📚 docu-mcp

Version CI Status License NPM

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 path
  • DOC_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