See MCP DocGen in action with real-world examples of generating documentation for Model Control Protocol servers.
Generate documentation for any MCP server with a single command.
Choose from multiple professional themes or create your own.
One-command deployment to popular hosting platforms.
Generate comprehensive documentation for a TypeScript-based MCP server with resources, tools, and prompts.
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
ListResourcesRequestSchema,
ReadResourceRequestSchema,
ListToolsRequestSchema,
CallToolRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
/**
* File Management MCP Server
* Provides file system operations for LLM applications
*/
const server = new Server(
{
name: "file-manager-server",
version: "1.0.0",
description: "Secure file system operations for AI applications"
},
{
capabilities: {
resources: {},
tools: {},
prompts: {}
}
}
);
// Resource handlers for file listing
server.setRequestHandler(ListResourcesRequestSchema, async () => {
return {
resources: [
{
uri: "file://documents",
name: "Documents Directory",
mimeType: "text/plain",
description: "Access to user documents"
}
]
};
});
// Tool for reading files
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [
{
name: "read_file",
description: "Read contents of a text file",
inputSchema: {
type: "object",
properties: {
path: {
type: "string",
description: "Path to the file to read"
}
},
required: ["path"]
}
},
{
name: "list_directory",
description: "List files in a directory",
inputSchema: {
type: "object",
properties: {
path: {
type: "string",
description: "Directory path to list"
}
},
required: ["path"]
}
}
]
};
});
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("File Manager MCP Server running on stdio");
}
main();
Advanced options:
# Custom output directory and theme
mcp-docgen generate ./file-manager-server \
--output ./custom-docs \
--theme professional \
--include-examples \
--add-search
# Generate with configuration file
mcp-docgen generate ./server --config mcp-docgen.json
Preview would show a beautiful, interactive documentation site with syntax highlighting, copy buttons, and mobile-responsive design.
Document a Python-based MCP server that provides data analysis capabilities.
#!/usr/bin/env python3
"""
Data Analytics MCP Server
Provides data analysis tools for CSV files and datasets
"""
import asyncio
import pandas as pd
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import (
Resource,
Tool,
TextContent,
ImageContent,
EmbeddedResource,
)
class DataAnalyzer:
"""MCP Server for data analysis operations"""
def __init__(self):
self.server = Server("data-analyzer")
self.setup_handlers()
def setup_handlers(self):
"""Configure MCP request handlers"""
@self.server.list_resources()
async def list_resources() -> list[Resource]:
"""List available data resources"""
return [
Resource(
uri="data://uploads",
name="Uploaded Datasets",
mimeType="text/csv",
description="User-uploaded CSV files for analysis"
)
]
@self.server.list_tools()
async def list_tools() -> list[Tool]:
"""List available analysis tools"""
return [
Tool(
name="analyze_csv",
description="Perform statistical analysis on CSV data",
inputSchema={
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "Path to CSV file"
},
"analysis_type": {
"type": "string",
"enum": ["summary", "correlation", "distribution"],
"description": "Type of analysis to perform"
}
},
"required": ["file_path", "analysis_type"]
}
),
Tool(
name="create_visualization",
description="Generate charts and plots from data",
inputSchema={
"type": "object",
"properties": {
"data_source": {"type": "string"},
"chart_type": {
"type": "string",
"enum": ["bar", "line", "scatter", "histogram"]
},
"x_column": {"type": "string"},
"y_column": {"type": "string"}
},
"required": ["data_source", "chart_type"]
}
)
]
@self.server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
"""Execute analysis tools"""
if name == "analyze_csv":
return await self.analyze_csv(**arguments)
elif name == "create_visualization":
return await self.create_visualization(**arguments)
else:
raise ValueError(f"Unknown tool: {name}")
async def analyze_csv(self, file_path: str, analysis_type: str):
"""Perform CSV analysis"""
# Implementation would go here
return [TextContent(
type="text",
text=f"Analysis results for {file_path} ({analysis_type})"
)]
async def main():
analyzer = DataAnalyzer()
async with stdio_server() as (read_stream, write_stream):
await analyzer.server.run(read_stream, write_stream)
if __name__ == "__main__":
asyncio.run(main())
{
"title": "Data Analytics MCP Server",
"description": "Professional data analysis tools for LLM applications",
"theme": "scientific",
"output": "./analytics-docs",
"features": {
"search": true,
"examples": true,
"playground": true,
"download": true
},
"sections": {
"overview": true,
"quickstart": true,
"resources": true,
"tools": true,
"api": true,
"examples": true,
"troubleshooting": true
},
"customization": {
"logo": "./assets/logo.png",
"colors": {
"primary": "#2563eb",
"secondary": "#7c3aed"
},
"footer": {
"links": [
{"title": "GitHub", "url": "https://github.com/user/data-analyzer"},
{"title": "Issues", "url": "https://github.com/user/data-analyzer/issues"}
]
}
}
}
Deploy your generated documentation to various hosting platforms with single commands.
# Generate and deploy to GitHub Pages
mcp-docgen generate ./my-server --output ./docs
mcp-docgen deploy --platform github-pages --source ./docs
# Or in one command
mcp-docgen deploy --platform github-pages --generate ./my-server
# Custom branch deployment
mcp-docgen deploy --platform github-pages \
--branch gh-pages \
--message "Update documentation"
Automatic Setup: MCP DocGen configures GitHub Pages settings, creates necessary workflows, and sets up custom domains if specified.
# Deploy to Netlify
mcp-docgen deploy --platform netlify --source ./docs
# With custom domain
mcp-docgen deploy --platform netlify \
--domain my-api-docs.com \
--source ./docs
# Enable form handling and redirects
mcp-docgen deploy --platform netlify \
--source ./docs \
--features forms,redirects,analytics
✅ Deployment Features:
# Generate optimized build
mcp-docgen build ./my-server --optimize --compress
# Deploy via SCP
mcp-docgen deploy --platform custom \
--host docs.mycompany.com \
--user deploy \
--path /var/www/docs
# Deploy via FTP
mcp-docgen deploy --platform ftp \
--host ftp.myhost.com \
--credentials ./ftp-config.json
# Generate Docker image
mcp-docgen docker --source ./docs --tag my-docs:latest
Start generating beautiful documentation for your MCP servers today.
Get Started View on GitHub