Documentation MCP Server

Documentation MCP Server

Generates professional documentation for multi-language codebases with deep AST-based code analysis, supporting Docusaurus, MkDocs, and Sphinx frameworks. Includes API documentation generation, PDF export, OpenAPI spec generation, and sales-ready documentation for code marketplaces.

Category
访问服务器

README

📚 Documentation MCP Server

Ein Model Context Protocol (MCP) Server zum Generieren professioneller Dokumentationen mit Unterstützung für mehrere Frameworks.

✨ Features

  • 🔍 Deep Code Analysis - AST-basierte Multi-Language Analysis
    • TypeScript/JavaScript: TypeScript Compiler API
    • Python: Native Python AST module
    • Go: Go parser & AST
    • PHP: Regex-basierte Analyse + PHP 8+ Features
    • Extrahiert Klassen, Funktionen, Interfaces, Methoden, Properties
    • PHP 8+: Enums, Traits, Attributes
    • Erfasst JSDoc/Docstrings/Go Doc/PHPDoc und berechnet Dokumentations-Coverage
    • Analysiert Imports/Exports und Module-Dependencies
  • 🌍 Multi-Language Projects - Automatische Erkennung und parallele Analyse mehrerer Sprachen
  • 📊 Projekt-Analyse - Automatische Code-Analyse für TypeScript, JavaScript, Python, Go, PHP
  • 🏗️ Struktur-Generierung - Erstellt komplette Dokumentations-Gerüste
  • ✍️ Seiten-Editor - Erstellt und bearbeitet einzelne Dokumentationsseiten
  • 📖 API-Dokumentation - Generiert API-Docs aus Code-Kommentaren
  • 🌐 Static Site Builder - Baut statische Websites für Hosting
  • 📄 PDF-Export - Konvertiert Dokumentation zu PDF
  • 👀 Live-Preview - Lokaler Entwicklungsserver

🛠️ Unterstützte Frameworks

  • Docusaurus (React-basiert, modern, verschiedene Templates)
  • MkDocs (Python-basiert, Markdown-fokussiert, einfach)
  • Sphinx (Python, sehr mächtig, für komplexe Projekte)

🚀 Quick Start

  1. Verzeichnisse erstellen:

    mkdir src
    mkdir src\tools
    
  2. Dependencies installieren:

    npm install
    
  3. Build:

    npm run build
    
  4. MCP Server in Claude Desktop konfigurieren (siehe SETUP.md)

📦 Tools

docs_analyze_project

Analysiert Projekt-Struktur und führt Deep Code Analysis durch.

Parameter:

  • projectPath (string, required) - Pfad zum Projekt
  • language (enum, optional) - Programmiersprache (typescript, javascript, python, go, rust, java, csharp)
  • deep (boolean, optional, default: true) - Aktiviert Deep Code Analysis

Deep Analysis Features:

  • 📦 Extrahiert Classes/Structs, Interfaces, Functions, Enums, Type Aliases
  • 🔍 Erfasst Methods, Properties, Constructors mit vollständigen Details
  • 📝 Analysiert JSDoc/Docstrings/Go Doc und berechnet Documentation Coverage
  • 🔗 Trackt Imports/Exports und Module Dependencies
  • 📊 Generiert Zusammenfassungs-Statistiken
  • 🎯 Multi-Language Support:
    • ✅ TypeScript/JavaScript (TypeScript Compiler API)
    • ✅ Python (Native Python AST)
    • ✅ Go (go/parser & go/ast)
    • ✅ PHP v2 (nikic/php-parser AST) - Neu! 100% genau
      • 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
    • 🌍 Automatische Multi-Language-Erkennung
    • 🔜 Rust, Java, C# (in Planung)

Beispiel-Rückgabe:

{
  "deepAnalysis": {
    "summary": {
      "totalFiles": 11,
      "totalClasses": 2,
      "totalInterfaces": 23,
      "totalFunctions": 16,
      "overallDocCoverage": 3.17
    }
  }
}

docs_generate_structure

Generiert Dokumentations-Gerüst.

Parameter:

  • projectPath (string, required) - Pfad zum Projekt
  • framework (enum, required) - docusaurus | mkdocs | sphinx
  • template (string, optional) - Template-Name
  • outputPath (string, optional) - Ausgabepfad (default: ./docs)

docs_create_page

Erstellt oder bearbeitet Dokumentationsseite.

Parameter:

  • docsPath (string, required) - Pfad zur Doku
  • pagePath (string, required) - Relativer Pfad zur Seite
  • title (string, required) - Seitentitel
  • content (string, required) - Markdown-Inhalt

docs_generate_api

Generiert API-Dokumentation aus Code.

Parameter:

  • projectPath (string, required) - Pfad zum Quellcode
  • outputPath (string, required) - Ausgabepfad
  • language (enum, required) - Programmiersprache

docs_build_static

Baut statische Website.

Parameter:

  • docsPath (string, required) - Pfad zur Doku
  • framework (enum, required) - Framework
  • outputPath (string, optional) - Ausgabepfad (default: ./build)

docs_export_pdf

Exportiert Dokumentation als PDF.

Parameter:

  • docsPath (string, required) - Pfad zur Doku
  • outputPath (string, required) - PDF-Ausgabepfad
  • includePages (array, optional) - Spezifische Seiten

docs_preview

Startet lokalen Dev-Server.

Parameter:

  • docsPath (string, required) - Pfad zur Doku
  • framework (enum, required) - Framework
  • port (number, optional) - Port (default: 3000/8000)

docs_generate_openapi

Generiert OpenAPI 3.0 Spezifikation aus PHP-Code.

Parameter:

  • projectPath (string, required) - PHP-Projekt Pfad
  • outputPath (string, optional) - Ausgabepfad (default: ./openapi.json)
  • format (enum, optional) - json | yaml (default: json)
  • title (string, optional) - API-Titel
  • version (string, optional) - API-Version
  • serverUrl (string, optional) - API Server URL

docs_generate_sales_docs 🎯 NEU!

Generiert professionelle, verkaufsfertige Dokumentation für CodeCanyon, ThemeForest, etc.

Parameter:

  • projectPath (string, required) - PHP-Projekt Pfad
  • outputDir (string, optional) - Ausgabe-Verzeichnis (default: ./sales-docs)
  • productName (string, required) - Produktname
  • productVersion (string, optional) - Version (default: 1.0.0)
  • author (string, required) - Autor/Firma
  • description (string, required) - Produktbeschreibung
  • price (string, optional) - Preis (z.B., "$49")
  • demoUrl (string, optional) - Live-Demo URL
  • supportEmail (string, optional) - Support E-Mail
  • features (array, optional) - Liste der Key Features

Generierte Dateien:

  1. README.md (2.5 KB) - Produkt-Übersicht mit Features, Statistiken, Requirements
  2. INSTALLATION.md (3.2 KB) - Schritt-für-Schritt Setup-Guide
  3. API_REFERENCE.md (24.2 KB) - Komplette API-Dokumentation
  4. CONFIGURATION.md (2.1 KB) - Umgebungsvariablen, Security
  5. EXAMPLES.md (4.0 KB) - Code-Beispiele (JS, PHP, Python)
  6. FAQ.md (2.2 KB) - Häufig gestellte Fragen
  7. CHANGELOG.md (0.9 KB) - Versionshistorie
  8. COMPLETE_DOCUMENTATION.md (39.0 KB) - All-in-One für PDF

Gesamt: ~78 KB professionelle Dokumentation!

🏗️ Architektur

src/
├── index.ts                    # MCP Server Hauptdatei
├── core/                       # Kern-Module für Deep Analysis
│   ├── types.ts               # Type-Definitionen für alle Sprachen
│   └── analyzer.ts            # Abstract Base Class & Factory
├── analyzers/                  # Sprachspezifische Analyzer
│   ├── 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-Implementierungen
    ├── analyzeProject.ts      # Deep Analysis Integration
    ├── generateStructure.ts
    ├── createPage.ts
    ├── generateApi.ts
    ├── buildStatic.ts
    ├── exportPdf.ts
    └── preview.ts

🔬 Deep Analysis Pipeline

  1. File Scanning - Durchsucht Projekt-Verzeichnis
  2. Language Detection - Erkennt dominante Programmiersprache
  3. Analyzer Selection - Wählt passenden AST-Parser (Factory Pattern)
  4. AST Parsing - Parst Code-Dateien mit sprachspezifischem Parser
    • TypeScript: TS Compiler API (in-process)
    • Python: Python AST module (subprocess)
    • Go: go/parser & go/ast (subprocess)
  5. Symbol Extraction - Extrahiert alle Code-Symbole (Classes, Functions, etc.)
  6. Documentation Analysis - Erfasst Dokumentations-Kommentare
  7. Summary Generation - Berechnet Statistiken und Coverage

📝 Lizenz

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选