media-forge

v0.2.0
io.github.PavelGuzenfeld/media-forge Checked 3 hours ago Published 8 months ago

MCP server for generating diagrams, charts, presentations, and animations for Markdown documentation

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_tool_guide

Get usage guide for a rendering tool — includes examples, anti-patterns to avoid, complexity limits, and tips. Call this BEFORE your first render to avoid common mistakes. Available guides: mermaid, d2, graphviz, vegalite, html_page, slides (or "all" for a summary).

ParameterTypeDescription
tool_name *stringTool to get guide for: "mermaid", "d2", "graphviz", "vegalite", "html_page", "slides", or "all"

render_mermaid

Render a Mermaid diagram to SVG or PNG. Supports: flowchart, sequenceDiagram, erDiagram, stateDiagram-v2, gantt, pie, gitGraph, classDiagram, journey, mindmap. IMPORTANT: Code must start with diagram type (e.g., 'flowchart TD'). Do NOT use semicolons. Do NOT use HTML tags in labels. Anti-patterns: 'graph' (use 'flowchart'), unquoted special chars in labels, >25 nodes without subgraphs. Call get_tool_guide('mermaid') for examples and full anti-pattern list.

ParameterTypeDescription
code *stringMermaid diagram code. Must start with diagram type declaration (e.g., 'flowchart TD', 'sequenceDiagram'). No semicolons.
formatstringOutput format. SVG preferred (smaller, git-friendly diffs)
themestringMermaid theme. 'neutral' best for docs, 'forest' for dark backgrounds

render_d2

Render a D2 architecture diagram to SVG or PNG. Best for: architecture diagrams with containers, nested groups, icons, and complex layouts. IMPORTANT: D2 syntax is NOT Mermaid. Use '->' for arrows (not '-->'), containers with 'name: { ... }' (not 'subgraph'). Anti-patterns: Mermaid syntax, unbalanced braces, >3 nesting levels. Call get_tool_guide('d2') for examples.

ParameterTypeDescription
code *stringD2 diagram code. Use '->' for arrows, 'name: { ... }' for containers. NOT Mermaid syntax.
formatstringOutput format. SVG preferred. PNG is slower (requires Chromium conversion).
layoutstringLayout engine. dagre=hierarchical (default), elk=complex layouts with many crossings
themenumberD2 theme ID: 0=default, 1=neutral-grey, 3=terminal, 100=neutral-default

render_graphviz

Render a Graphviz DOT diagram to SVG or PNG. Best for: dependency graphs, network diagrams, tree structures, large auto-layout graphs (100+ nodes). IMPORTANT: Source must be wrapped in 'digraph G { ... }' or 'graph G { ... }'. Use '->' with digraph, '--' with graph. Engine guide: dot=hierarchical, neato=spring, fdp=force-directed, sfdp=large graphs, circo=circular, twopi=radial. Call get_tool_guide('graphviz') for examples.

ParameterTypeDescription
dot_source *stringGraphviz DOT source. Must start with 'digraph G {' or 'graph G {'. Use '->' for directed, '--' for undirected.
enginestringLayout engine: dot=hierarchical, neato=spring, fdp=force-directed, sfdp=large, circo=circular, twopi=radial
formatstringOutput format. SVG preferred.

render_chart

Render a Vega-Lite chart to SVG or PNG. Supports: bar, line, point (scatter), area, rect (heatmap), boxplot, and layered/composite charts. IMPORTANT: spec_json must be valid JSON with "$schema", "data", "mark", and "encoding" fields. Anti-patterns: missing $schema, omitting encoding types, >500 inline data rows. Call get_tool_guide('vegalite') for examples.

ParameterTypeDescription
spec_json *stringVega-Lite JSON spec (as string). Must include "$schema", "data", "mark", "encoding". Always specify encoding types (quantitative/nominal/temporal/ordinal).
formatstringOutput format. SVG preferred.
scalenumberScale factor for PNG (default: 1). Use 2 for retina-crisp output.

render_html_page

Render a self-contained themed HTML page from body content. No Docker required. Wraps your HTML in a design system with typography, depth tiers, cards, grids, KPIs, badges, and section navigation. IMPORTANT: body_html is the INNER content only — do NOT include <html>, <head>, or <body> tags. Use mf- prefixed CSS classes: mf-hero, mf-elevated, mf-card, mf-grid, mf-kpi, mf-badge-success, etc. Themes: swiss (clean docs), midnight (presentations), warm (reports), terminal (dev content). Call get_tool_guide('html_page') for design system reference and examples.

ParameterTypeDescription
body_html *stringHTML body content (inner content only, no <html>/<head>/<body>). Use mf- prefixed classes for styling.
title *stringPage title (shown in header and browser tab)
descriptionstringPage description (shown below title and in meta tag)
nav_sectionsarraySection names for floating navigation. Must match id attributes on <section> elements in body_html.
themestringVisual theme: swiss=clean docs, midnight=dark editorial, warm=cream reports, terminal=dev monospace

render_slides

Render a self-contained HTML slide deck with keyboard/touch navigation, progress bar, and transitions. No Docker required. Supports 8 slide types: title, content, split, code, quote, kpi, image, section. IMPORTANT: slides is a JSON array string of objects with title, content (HTML), and optional type. Content density limits: max 6 bullets per slide, max 10 code lines, max 25 words for quotes, max 30 slides total. Call get_tool_guide('slides') for slide type reference and examples.

ParameterTypeDescription
slides *stringJSON array of slide objects: [{"title": "...", "content": "HTML...", "type": "content|title|split|code|quote|kpi|image|section"}]
title *stringPresentation title
authorstringAuthor name (shown on title slide)
themestringVisual theme for the slide deck

list_assets

List all generated media assets in the output directory.

ParameterTypeDescription
directorystringSubdirectory to list (default: docs/generated)