MCP server for generating diagrams, charts, presentations, and animations for Markdown documentation
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
MCP server that generates diagrams, charts, HTML pages, and slide decks from text DSLs -- designed for AI coding agents to embed into Markdown.
LLM agents call tools like render_mermaid, render_html_page, or render_slides with text input, and get back file paths to assets ready to embed in docs.
| Tool | Input | Formats | Use Case |
|---|---|---|---|
render_mermaid | Mermaid code | SVG, PNG | Flowcharts, sequence, ER, state, Gantt, git graphs |
render_d2 | D2 code | SVG, PNG | Architecture diagrams with containers and icons |
render_graphviz | DOT code | SVG, PNG | Dependency graphs, network diagrams |
render_chart | Vega-Lite JSON | SVG, PNG | Bar, line, scatter, area, heatmap charts |
| Tool | Input | Output | Use Case |
|---|---|---|---|
render_html_page | HTML body + theme | Self-contained HTML | Technical docs, reports, dashboards |
render_slides | JSON slide array + theme | HTML slide deck | Presentations, status updates, walkthroughs |
| Tool | Description |
|---|---|
get_tool_guide | Usage examples, anti-patterns, complexity limits per tool |
list_assets | List all generated files in the output directory |
HTML page and slide tools work without Docker.
Option A -- npx (no install)
Option B -- Clone and build
Any MCP-compatible client (Claude Code, Cursor, VS Code + Copilot, Cline, etc.) can use this server. The standard config:
Where to add this depends on your client:
~/.claude/settings.json.vscode/mcp.jsonAsk your AI assistant to generate diagrams, pages, or presentations:
"Create a sequence diagram showing the OAuth2 flow and embed it in the README"
"Generate an HTML page summarizing the API architecture with KPI cards"
"Make a slide deck with our Q1 metrics and architecture overview"
The agent calls the appropriate tool, gets back a file path, and embeds it in your markdown.
Key design decisions:
network_mode: noneerror_type, error_message, and suggestion to enable LLM self-correctionGet usage guide for any tool before rendering. Returns examples, anti-patterns to avoid, complexity limits, and tips.
Available guides: mermaid, d2, graphviz, vegalite, html_page, slides, or all for a summary.
| Parameter | Type | Default | Description |
|---|---|---|---|
code | string | required | Mermaid diagram code (must start with diagram type) |
format | svg | png | svg | Output format |
theme | default | dark | forest | neutral | default | Mermaid theme |
Pre-validation catches: missing diagram type, semicolons, HTML in labels, >25 nodes.
| Parameter | Type | Default | Description |
|---|---|---|---|
code | string | required | D2 diagram code |
format | svg | png | svg | Output format |
theme | number | -- | Theme ID (0=default, 1=neutral-grey, 3=terminal) |
layout | dagre | elk | tala | dagre | Layout engine |
Pre-validation catches: Mermaid/D2 syntax confusion, unbalanced braces, >3 nesting depth.
| Parameter | Type | Default | Description |
|---|---|---|---|
dot_source | string | required | Graphviz DOT source code |
engine | dot | neato | fdp | sfdp | twopi | circo | dot | Layout engine |
format | svg | png | svg | Output format |
Pre-validation catches: missing graph wrapper, -> in undirected graphs, unbalanced braces.
| Parameter | Type | Default | Description |
|---|---|---|---|
spec_json | string | required | Vega-Lite JSON specification |
format | svg | png | svg | Output format |
scale | number | 1 | Scale factor for PNG output |
Pre-validation catches: invalid JSON, missing $schema/data/mark, >500 inline data rows.
Generates a self-contained themed HTML page. No Docker required.
| Parameter | Type | Default | Description |
|---|---|---|---|
title | string | required | Page title |
body_html | string | required | HTML body content (inner content only, no <html>/<head>/<body>) |
theme | swiss | midnight | warm | terminal | swiss | Visual theme |
description | string | -- | Page description (meta tag + header) |
nav_sections | string[] | -- | Section names for floating IntersectionObserver navigation |
Design system CSS classes:
| Class | Purpose |
|---|---|
mf-hero | Primary highlight section (large shadow) |
mf-elevated | Secondary highlight (medium shadow) |
mf-card | Bordered content card |
mf-recessed | De-emphasized content |
mf-grid mf-grid-2 | Responsive 2-column grid |
mf-grid mf-grid-3 | Responsive 3-column grid |
mf-split | Two equal columns |
mf-kpi + mf-kpi-value + mf-kpi-label | Key metric display |
mf-badge-success/warning/error/info | Status badges |
Themes:
| Theme | Style | Best for |
|---|---|---|
swiss | White, geometric, blue accent | Technical docs |
midnight | Deep navy, serif, gold accent | Presentations |
warm | Cream paper, bold sans, terracotta | Reports |
terminal | Dark, monospace, cyan accent | Developer content |
Generates a self-contained HTML slide deck with keyboard/touch navigation. No Docker required.
| Parameter | Type | Default | Description |
|---|---|---|---|
title | string | required | Presentation title |
slides | string | required | JSON array of slide objects |
theme | swiss | midnight | warm | terminal | swiss | Visual theme |
author | string | -- | Author (shown on title slide) |
Slide types:
| Type | Layout | Best for |
|---|---|---|
title | Centered large text + subtitle | Opening/closing slides |
section | Centered heading + description | Topic dividers |
content | Heading + body (bullets, text) | Most content |
split | Heading + two columns | Before/after, comparisons |
code | Heading + code block | Code walkthroughs |
quote | Large blockquote + attribution | Testimonials, key quotes |
kpi | Heading + auto-grid metrics | Dashboards, stats |
image | Heading + centered image | Screenshots, diagrams |
Navigation: Arrow keys, Space, PageUp/PageDown, Home/End. Touch: swipe left/right. Click dots to jump.
Returns a JSON array of all generated files with name, path, size, and modification time.
All tools return structured errors that help LLMs self-correct:
Error types: syntax_error, rendering_error, dependency_missing.
Pre-validation catches common LLM mistakes before hitting the renderer:
graph syntax-->, subgraph), unbalanced bracesdigraph/graph wrapper, -> in undirected graphs| Variable | Default | Description |
|---|---|---|
PROJECT_ROOT | cwd() | Project root for output path resolution |
OUTPUT_DIR | docs/generated | Output directory relative to PROJECT_ROOT |
MEDIA_FORGE_CONTAINER | media-forge-renderer | Docker container name |
HTML page and slide integration tests run without Docker.
See examples/ for sample input files:
| File | Tool | Description |
|---|---|---|
mermaid/flowchart.mmd | render_mermaid | Decision flowchart |
mermaid/sequence.mmd | render_mermaid | Client-server sequence |
d2/architecture.d2 | render_d2 | Backend architecture with containers |
graphviz/dependencies.dot | render_graphviz | npm dependency graph |
vegalite/bar-chart.json | render_chart | Tool performance comparison |
See examples/README.md for MCP tool call examples and expected responses.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/media-forge)<a href="https://allmcps.com/mcp/media-forge"><img src="https://allmcps.com/api/badge/media-forge?style=directory" alt="Media Forge on AllMCPs" /></a>