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
noneNo credentials- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
false
Quick Links
Lua APIAgent-facing namespace and function reference. Mermaid CLIHeadless setup and direct function calls. Mermaid MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Mermaid MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Mermaid.
Claude Code Mermaid MCP setup for Claude Code. Cursor Mermaid MCP setup for Cursor. Codex Mermaid MCP setup for Codex. OpenAI Agents Mermaid MCP setup for OpenAI Agents SDK. Claude Agent SDK Mermaid MCP setup for Claude Agent SDK. Vercel AI SDK Mermaid MCP setup for Vercel AI SDK. LangChain Mermaid MCP setup for LangChain. LangGraph Mermaid MCP setup for LangGraph. CrewAI Mermaid MCP setup for CrewAI. MCP clients Mermaid MCP setup for Generic MCP Clients.
Mermaid CLI Matrix
Use these pages for direct Mermaid CLI workflows in scripts, CI, cron, and agent wrappers.
CI Mermaid CLI for CI. Cron Jobs Mermaid CLI for cron jobs. Shell Scripts Mermaid CLI for shell scripts. Headless Automation Mermaid CLI for headless automation. Coding Agents Mermaid CLI for coding agents.
Runtime Requirements
| Name | Type | Description |
|---|---|---|
mmdc | binary | Mermaid CLI is required to render diagrams. |
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
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 |