KosmoKrator

rendering

Mermaid MCP, CLI, and Lua Integration for AI Agents

Mermaid integration docs for AI agents: MCP gateway setup, Mermaid CLI commands, Lua API reference, credentials, and function schemas.

1 functions 0 read 1 write No credentials auth

Mermaid for agents

No credentials required; available in web and CLI hosts when runtime dependencies are installed.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
mermaid
route_slug
mermaid
package
mermaid
auth_strategy
none No credentials
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
false

Quick Links

Mermaid MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Mermaid.

Mermaid CLI Matrix

Use these pages for direct Mermaid CLI workflows in scripts, CI, cron, and agent wrappers.

Runtime Requirements

NameTypeDescription
mmdc binary Mermaid CLI is required to render diagrams.

Function Catalog

FunctionTypeParametersDescription
mermaid.render_mermaid Write write 4 Render a Mermaid diagram to a PNG image. Pass valid Mermaid syntax and get back a markdown image embed. Supported diagram types: flowchart, sequence, class, state, ER, Gantt, pie, quadrant, requirement, git graph, C4, mindmap, timeline, sankey, XY chart, block. Example syntax: ``` graph TD A[Start] --> B{Decision} B -->|Yes| C[Action] B -->|No| D[End] ``` Tips: - Use `graph TD` for top-down flowcharts, `graph LR` for left-to-right - Use `sequenceDiagram` for sequence diagrams - Use `erDiagram` for entity-relationship diagrams - Use `classDiagram` for class diagrams - Use `stateDiagram-v2` for state diagrams - Use `gantt` for Gantt charts - Use `pie` for pie charts - Use `gitgraph` for git graphs - Use `mindmap` for mind maps