Documentation MCP Server
Analyzes CodeIgniter 3/4 projects to detect controllers, models, routes, middleware, and MVC patterns for documentation generation.
Generates and builds React-based documentation sites with modern templates and static site generation capabilities.
Analyzes JavaScript code using the TypeScript Compiler API to extract code structure, JSDoc comments, and dependencies for documentation.
Analyzes Laravel projects to detect Illuminate components, routes with attributes, middleware, and framework-specific patterns for documentation.
Creates and edits Markdown-based documentation pages across multiple documentation frameworks.
Performs deep AST-based analysis of PHP 8+ code including namespaces, types, enums, traits, attributes, routes, and middleware detection.
Analyzes Python code using native AST parsing to extract classes, functions, docstrings, and dependencies for documentation.
Generates and builds Python-based documentation sites for complex projects with powerful documentation features.
Auto-generates OpenAPI 3.0/Swagger specifications from PHP code including routes, middleware, and security schemes in JSON or YAML format.
Analyzes Symfony projects to detect framework components, attributes like IsGranted, and Symfony-specific patterns for documentation.
Performs deep analysis of TypeScript code using the TypeScript Compiler API to extract classes, interfaces, functions, JSDoc comments, and module dependencies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Documentation MCP Server analyze my TypeScript project and generate API docs for it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π 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-serverConfigure 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
Middleware Detection: π
Laravel:
#[Middleware('auth')]Symfony:
#[IsGranted('ROLE_ADMIN')]CodeIgniter 4:
#[Filter('auth')]CodeIgniter 3:
@middleware(Docblocks)Class-Level & Method-Level
Middleware Parameters
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
Available Tools
9 toolsdocs_analyze_projectA
Analyze project structure and perform deep code analysis to understand the project for documentation generation. Supports TypeScript, JavaScript, Python, Go, and more. Deep analysis extracts classes, functions, interfaces, documentation coverage, and more.
Inputs: projectPath (required), language, deep.
docs_build_staticA
Build static website for online hosting (ready for GitHub Pages, Netlify, Vercel, etc.)
Inputs: docsPath (required), framework (required), outputPath.
docs_create_pageB
Create or edit individual documentation pages with Markdown content
Inputs: docsPath (required), pagePath (required), title (required), content (required).
docs_export_pdfB
Generate PDF from documentation using Puppeteer/Playwright
Inputs: docsPath (required), outputPath (required), includePages.
docs_generate_apiC
Generate API documentation from code (JSDoc, Docstrings, etc.)
Inputs: projectPath (required), outputPath (required), language (required).
docs_generate_openapiA
Generate OpenAPI 3.0 specification from analyzed PHP routes with middleware, parameters, and security schemes. Automatically converts controller routes to API documentation.
Inputs: projectPath (required), outputPath, format, title, +2 more.
docs_generate_sales_docsB
Generate professional sales-ready documentation for CodeCanyon, ThemeForest, and other marketplaces. Creates comprehensive Markdown documentation (README, Installation, API Reference, Configuration, Examples, FAQ, Changelog) with optional PDF export.
Inputs: projectPath (required), productName (required), author (required), description (required), +6 more.
docs_generate_structureB
Generate documentation scaffold/structure based on project analysis. Creates initial directory structure and configuration files.
Inputs: projectPath (required), framework (required), template, outputPath.
docs_previewB
Start local development server to preview documentation
Inputs: docsPath (required), framework (required), port.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 9 tools
Tools have distinct purposes, though docs_generate_api and docs_generate_openapi could be confused as both generate API documentation, but from different sources (code vs routes). The descriptions clarify the difference.
All tools follow a consistent 'docs_verb_noun' pattern (e.g., docs_analyze_project, docs_build_static, docs_create_page). No mixed naming conventions.
9 tools is well-scoped for a documentation server, covering analysis, generation, editing, building, exporting, and previewing without unnecessary bloat or deficiency.
The toolset provides a complete lifecycle: analyze project, generate structure, create/edit pages, generate API/OpenAPI/sales docs, build static site, export PDF, and preview. No obvious gaps.
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Generate and review codebase docs. 77 tools; scoped, credit-approved repository reviews.
AI-powered codebase analysis β call graphs, security, dead code, complexity. 150+ tools.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.