
Media Forge
io.github.PavelGuzenfeld由 GitHub 帳號 PavelGuzenfeld 發布v0.2.0更新於 Nov 10, 2026
MCP server for generating diagrams, charts, presentations, and animations for Markdown documentation
概覽
根據文字輸入產生圖表、圖形、HTML 頁面與簡報,並回傳可嵌入 Markdown 文件的檔案路徑。
- 可以做什麼
- Media Forge 提供渲染工具,接收文字 DSL 並回傳所產生資源的相對檔案路徑。圖表工具在 Docker 容器內將 Mermaid、D2、Graphviz DOT 與 Vega-Lite 圖表渲染為 SVG 或 PNG。HTML 工具不需 Docker 即可產生自帶樣式的主題頁面與 HTML 簡報。輔助工具提供各工具的使用指南並列出已產生的檔案。
- 適用情境
- 適合需要將圖表、圖形、技術 HTML 頁面或簡報產生為檔案並用於文件的場景。適用於希望將產生的資源提交到程式碼倉庫並嵌入 Markdown,而非以內嵌資料回傳的工作流程。
- 執行需求
- 以本機 Node.js 程序執行,通常透過 npx mcp-media-forge 或建置後的 dist/index.js 啟動。圖表工具需要從隨附的 docker compose 檔案啟動 Docker 容器;HTML 頁面與簡報工具不需 Docker。選用環境變數 PROJECT_ROOT、OUTPUT_DIR 與 MEDIA_FORGE_CONTAINER 可控制輸出路径與容器名稱。未宣告身分驗證或 API 金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Media Forge,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP Media Forge
[npm] [MCP Registry] [License: MIT]
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.
Output Gallery
Mermaid Flowchart
[Mermaid flowchart]Mermaid Sequence Diagram
[Mermaid sequence diagram]D2 Architecture Diagram
[D2 architecture diagram]Graphviz Dependency Graph
[Graphviz dependency graph]Vega-Lite Bar Chart
[Vega-Lite bar chart]Tools
Diagram & Chart Renderers (Docker)
HTML Generators (No Docker)
Utilities
Quick Start
1. Start the rendering container (for diagram tools)
HTML page and slide tools work without Docker.
2. Install the MCP server
Option A -- npx (no install)
Option B -- Clone and build
3. Register with your MCP client
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 Code:
~/.claude/settings.json - Cursor: MCP settings panel
- VS Code (Copilot):
.vscode/mcp.json - Cline: MCP server configuration
4. Use it
Ask 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.
How It Works
Key design decisions:
- Text in, file path out -- returns relative paths, never base64 blobs
- Content-hash naming -- same input = same file = free caching + git-friendly
- SVG preferred -- vector format, small files, diffs cleanly in git
- Docker-contained -- diagram renderers run in a sandboxed container with
network_mode: none - Self-contained HTML -- pages and slides have zero external dependencies (inline CSS/JS)
- Input pre-validation -- catches common mistakes before Docker round-trips
- Structured errors -- error responses include
error_type,error_message, andsuggestionto enable LLM self-correction
Tool Reference
get_tool_guide
Get 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.
render_mermaid
Pre-validation catches: missing diagram type, semicolons, HTML in labels, >25 nodes.
render_d2
Pre-validation catches: Mermaid/D2 syntax confusion, unbalanced braces, >3 nesting depth.
render_graphviz
Pre-validation catches: missing graph wrapper, -> in undirected graphs, unbalanced braces.
render_chart
Pre-validation catches: invalid JSON, missing $schema/data/mark, >500 inline data rows.
render_html_page
Generates a self-contained themed HTML page. No Docker required.
Design system CSS classes:
Themes:
render_slides
Generates a self-contained HTML slide deck with keyboard/touch navigation. No Docker required.
Slide types:
Navigation: Arrow keys, Space, PageUp/PageDown, Home/End. Touch: swipe left/right. Click dots to jump.
list_assets
Returns a JSON array of all generated files with name, path, size, and modification time.
Error Handling
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:
- Mermaid: missing diagram type, semicolons, HTML tags, legacy
graphsyntax - D2: Mermaid syntax confusion (
-->,subgraph), unbalanced braces - Graphviz: missing
digraph/graphwrapper,->in undirected graphs - Vega-Lite: invalid JSON, missing required fields, oversized inline data
Environment Variables
Development
Running integration tests
HTML page and slide integration tests run without Docker.
Examples
See examples/ for sample input files:
See examples/README.md for MCP tool call examples and expected responses.
License
來源:README.md,提交 315951c
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分