Documentation MCP Server
Generates professional documentation for multi-language projects with deep code analysis, supporting frameworks like Docusaurus, MkDocs, and Sphinx, including API docs, PDF export, and OpenAPI specifications.
README
š Documentation MCP Server
A Model Context Protocol (MCP) Server for generating professional documentation with support for multiple frameworks.
⨠Features
- š Deep Code Analysis - AST-based Multi-Language Analysis
- TypeScript/JavaScript: TypeScript Compiler API
- Python: Native Python AST module
- Go: Go parser & AST
- PHP: Regex-based analysis + PHP 8+ Features
- Extracts classes, functions, interfaces, methods, properties
- PHP 8+: Enums, Traits, Attributes
- Captures JSDoc/Docstrings/Go Doc/PHPDoc and calculates documentation coverage
- Analyzes imports/exports and module dependencies
- š Multi-Language Projects - Automatic detection and parallel analysis of multiple languages
- š Project Analysis - Automatic code analysis for TypeScript, JavaScript, Python, Go, PHP
- šļø Structure Generation - Creates complete documentation scaffolds
- āļø Page Editor - Creates and edits individual documentation pages
- š API Documentation - Generates API docs from code comments
- š Static Site Builder - Builds static websites for hosting
- š PDF Export - Converts documentation to PDF
- š Live Preview - Local development server
š ļø Supported Frameworks
- Docusaurus (React-based, modern, various templates)
- MkDocs (Python-based, Markdown-focused, simple)
- Sphinx (Python, very powerful, for complex projects)
š Quick Start
-
Install globally:
npm install -g documentation-mcp-server -
Configure in Claude Desktop (see SETUP.md):
{ "mcpServers": { "docs": { "command": "npx", "args": ["-y", "documentation-mcp-server"] } } } -
Start using the documentation tools in Claude!
š¦ Tools
docs_analyze_project
Analyzes project structure and performs deep code analysis.
Parameters:
projectPath(string, required) - Path to projectlanguage(enum, optional) - Programming language (typescript, javascript, python, go, rust, java, csharp)deep(boolean, optional, default: true) - Enables deep code analysis
Deep Analysis Features:
- š¦ Extracts Classes/Structs, Interfaces, Functions, Enums, Type Aliases
- š Captures Methods, Properties, Constructors with complete details
- š Analyzes JSDoc/Docstrings/Go Doc and calculates documentation coverage
- š Tracks Imports/Exports and Module Dependencies
- š Generates summary statistics
- šÆ Multi-Language Support:
- ā TypeScript/JavaScript (TypeScript Compiler API)
- ā Python (Native Python AST)
- ā Go (go/parser & go/ast)
- ā
PHP v2 (nikic/php-parser AST) - New! 100% accurate
- Namespaces & Use-Statements
- Union/Intersection/Nullable Types
- Enums, Traits, Attributes (PHP 8+)
- Framework Detection:
- CodeIgniter 3/4 (Controller, Model)
- Laravel (Illuminate*)
- Symfony (Symfony*)
- MVC Pattern Recognition
- Route Detection: š
- Convention-based:
/controller/method/{param} - Attribute-based:
#[Get('/')],#[Post('/')] - HTTP Methods: GET, POST, PUT, PATCH, DELETE
- Parameter Types & Required/Optional Status
- Convention-based:
- Middleware Detection: š
- Laravel:
#[Middleware('auth')] - Symfony:
#[IsGranted('ROLE_ADMIN')] - CodeIgniter 4:
#[Filter('auth')] - CodeIgniter 3:
@middleware(Docblocks) - Class-Level & Method-Level
- Middleware Parameters
- Laravel:
- OpenAPI 3.0 Export: š
- Auto-generates Swagger/OpenAPI specs
- Routes ā Paths conversion
- Middleware ā Security Schemes
- JSON & YAML format support
- ā PHP v1 (Regex-based) - Fallback
- š Automatic Multi-Language Detection
- š Rust, Java, C# (planned)
Example Response:
{
"deepAnalysis": {
"summary": {
"totalFiles": 11,
"totalClasses": 2,
"totalInterfaces": 23,
"totalFunctions": 16,
"overallDocCoverage": 3.17
}
}
}
docs_generate_structure
Generates documentation scaffold.
Parameters:
projectPath(string, required) - Path to projectframework(enum, required) - docusaurus | mkdocs | sphinxtemplate(string, optional) - Template nameoutputPath(string, optional) - Output path (default: ./docs)
docs_create_page
Creates or edits documentation page.
Parameters:
docsPath(string, required) - Path to docspagePath(string, required) - Relative path to pagetitle(string, required) - Page titlecontent(string, required) - Markdown content
docs_generate_api
Generates API documentation from code.
Parameters:
projectPath(string, required) - Path to source codeoutputPath(string, required) - Output pathlanguage(enum, required) - Programming language
docs_build_static
Builds static website.
Parameters:
docsPath(string, required) - Path to docsframework(enum, required) - FrameworkoutputPath(string, optional) - Output path (default: ./build)
docs_export_pdf
Exports documentation as PDF.
Parameters:
docsPath(string, required) - Path to docsoutputPath(string, required) - PDF output pathincludePages(array, optional) - Specific pages
docs_preview
Starts local dev server.
Parameters:
docsPath(string, required) - Path to docsframework(enum, required) - Frameworkport(number, optional) - Port (default: 3000/8000)
docs_generate_openapi
Generates OpenAPI 3.0 specification from PHP code.
Parameters:
projectPath(string, required) - PHP project pathoutputPath(string, optional) - Output path (default: ./openapi.json)format(enum, optional) - json | yaml (default: json)title(string, optional) - API titleversion(string, optional) - API versionserverUrl(string, optional) - API server URL
docs_generate_sales_docs šÆ NEW!
Generates professional, sales-ready documentation for CodeCanyon, ThemeForest, etc.
Parameters:
projectPath(string, required) - PHP project pathoutputDir(string, optional) - Output directory (default: ./sales-docs)productName(string, required) - Product nameproductVersion(string, optional) - Version (default: 1.0.0)author(string, required) - Author/Companydescription(string, required) - Product descriptionprice(string, optional) - Price (e.g., "$49")demoUrl(string, optional) - Live demo URLsupportEmail(string, optional) - Support emailfeatures(array, optional) - List of key features
Generated Files:
- README.md (2.5 KB) - Product overview with features, statistics, requirements
- INSTALLATION.md (3.2 KB) - Step-by-step setup guide
- API_REFERENCE.md (24.2 KB) - Complete API documentation
- CONFIGURATION.md (2.1 KB) - Environment variables, security
- EXAMPLES.md (4.0 KB) - Code examples (JS, PHP, Python)
- FAQ.md (2.2 KB) - Frequently asked questions
- CHANGELOG.md (0.9 KB) - Version history
- COMPLETE_DOCUMENTATION.md (39.0 KB) - All-in-one for PDF
Total: ~78 KB professional documentation!
šļø Architecture
src/
āāā index.ts # MCP Server main file
āāā core/ # Core modules for deep analysis
ā āāā types.ts # Type definitions for all languages
ā āāā analyzer.ts # Abstract base class & factory
āāā analyzers/ # Language-specific analyzers
ā āāā typescript.ts # TypeScript/JavaScript (TS Compiler API)
ā āāā python.ts # Python wrapper (subprocess)
ā āāā go.ts # Go wrapper (subprocess)
ā āāā helpers/ # Native language parsers
ā āāā python_analyzer.py # Python AST parser
ā āāā go_analyzer.go # Go AST parser
āāā tools/ # MCP tool implementations
āāā analyzeProject.ts # Deep analysis integration
āāā generateStructure.ts
āāā createPage.ts
āāā generateApi.ts
āāā buildStatic.ts
āāā exportPdf.ts
āāā preview.ts
š¬ Deep Analysis Pipeline
- File Scanning - Scans project directory
- Language Detection - Detects dominant programming language
- Analyzer Selection - Selects appropriate AST parser (Factory Pattern)
- AST Parsing - Parses code files with language-specific parser
- TypeScript: TS Compiler API (in-process)
- Python: Python AST module (subprocess)
- Go: go/parser & go/ast (subprocess)
- Symbol Extraction - Extracts all code symbols (Classes, Functions, etc.)
- Documentation Analysis - Captures documentation comments
- Summary Generation - Calculates statistics and coverage
š License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.