Agentic Mermaid is an MCP server published by io.github.adewale, hosted at agentic-mermaid.dev. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 9 tools, including execute, describe_sdk, render_svg, render_ascii, render_png.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
1 connections through 5 shared values. Tap any node.
Run JavaScript in an isolated sandbox; return a value. No promises, async/await, dynamic import, or type annotations. SVG/ASCII/layout enforce security:'strict', embedFontImport:false. SDK: type DiagramKind='flowchart'|'state'|'sequence'|'timeline'|'class'|'er'|'journey'|'architecture'|'xychart'|'pie'|'quadrant'|'gantt'|'mindmap'|'gitgraph'|'radar'|'sankey'|'c4'|'packet'|'kanban'|'requirement'|'treemap'|'ishikawa'|'block'|'eventmodeling'|'zenuml' type MutationOp={kind:string;[field:string]:unknown} type Result<T,E={code:string;message:string}>={ok:true;value:T}|{ok:false;error:E} type ExternalFamilyId=`family:${string}`;interface SourceLocation{readonly line:number;readonly col:number;}interface SourceMap{readonly nodes:ReadonlyMap<string,SourceLocation>;readonly edges:ReadonlyMap<string,SourceLocation>;readonly groups:ReadonlyMap<string,SourceLocation>;readonly labels:ReadonlyMap<string,SourceLocation>;readonly spans?:SourceMapSpans;}interface SourceMapSpans{readonly preserved:PreservedSourceSpans;readonly nodes:ReadonlyMap<string,SourceSpan>;readonly edges:ReadonlyMap<string,SourceSpan>;readonly groups:ReadonlyMap<string,SourceSpan>;readonly labels:ReadonlyMap<string,SourceSpan>;readonly metadata?:ReadonlyMap<string,ReadonlyMap<string,{readonly key:SourceSpan;readonly value:SourceSpan;}>>;}interface PreservedSourceSpans{readonly source:SourceSpan;readonly wrapper?:SourceSpan;readonly frontmatter?:SourceSpan;readonly initDirectives?:readonly SourceSpan[];readonly accessibilityDirectives?:readonly SourceSpan[];readonly header:SourceSpan;readonly body:SourceSpan;}interface SourceSpan{readonly start:SourceSpanPoint;readonly end:SourceSpanPoint;}interface SourceSpanPoint{readonly offset:number;readonly line:number;readonly col:number;}interface SourcePreservationReceipt{readonly version:1;readonly classification:'unsupported'|'inventory-only'|'unknown';readonly source:string;readonly header:string;readonly upstreamFamilyId?:string;readonly mermaidVersion:string;readonly spans?:PreservedSourceSpans;}interface ParseError{readonly code:string;readonly message:string;readonly line?:number;readonly col?:number;readonly preservation?:SourcePreservationReceipt;readonly help?:string;}type RenderedRegionKind='node'|'edge'|'label'|'canvas'|'group'|'cluster'|'lane'|'band'|'compartment'|'plot'|'ring';interface RenderedRegion{id:string;kind:RenderedRegionKind;elementId?:string;parentId?:string;bounds:{x:number;y:number;w:number;h:number;};cellSpans?:Array<{row:number;start:number;end:number;}>;occludedCellSpans?:Array<{row:number;start:number;end:number;}>;sourceLine?:number;}type DiagramActionKind='href'|'call'|'callback';type DiagramActionSecurity='safe'|'unsafe'|'source-only'|'unsupported';interface DiagramActionRecord{id?:string;regionId?:string;family:DiagramKind;target:string;action:DiagramActionKind;raw:string;line?:number;href?:string;tooltip?:string;security:DiagramActionSecurity;executable:false;message?:string;}interface LayoutRect{x:number;y:number;w:number;h:number;}interface ExtensionIdentity<Kind extends string=string>{readonly id:`${Kind}:${string}`;readonly kind:Kind;readonly version:string;readonly compatibility:ExtensionCompatibility;readonly provenance:ExtensionProvenance;}interface ExtensionCompatibility{readonly[contract:string]:string|undefined;readonly core?:string;readonly scene?:string;}interface ExtensionProvenance{readonly owner:string;readonly source:string;readonly reference?:string;}type CheckMermaidSpec=readonly string[]|CheckMermaidObjectSpec;interface CheckMermaidObjectSpec{include?:readonly string[];exclude?:readonly string[];exact?:boolean;}interface CheckMermaidResult{ok:boolean;missing:string[];unexpected:string[];facts:string[];}interface CreateMermaidOptions{c4Variant?:C4Variant;direction?:Direction;}type C4Variant='C4Context'|'C4Container'|'C4Component'|'C4Dynamic'|'C4Deployment';type Direction='TD'|'TB'|'LR'|'BT'|'RL'; interface ValidDiagram{readonly kind:DiagramKind;readonly source:SourceMap} interf
None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
| Parameter | Type | Description |
|---|---|---|
| code * | string | JavaScript to execute; mermaid.* SDK is global. |
| timeoutMs | integer | Optional CPU-time budget (default 5000ms, max 30000ms). |
{
"name": "execute",
"title": "Execute Mermaid SDK code",
"description": "Run JavaScript in an isolated sandbox; return a value.\nNo promises, async/await, dynamic import, or type annotations.\nSVG/ASCII/layout enforce\nsecurity:'strict', embedFontImport:false.\n\nSDK:\ntype DiagramKind='flowchart'|'state'|'sequence'|'timeline'|'class'|'er'|'journey'|'architecture'|'xychart'|'pie'|'quadrant'|'gantt'|'mindmap'|'gitgraph'|'radar'|'sankey'|'c4'|'packet'|'kanban'|'requirement'|'treemap'|'ishikawa'|'block'|'eventmodeling'|'zenuml'\ntype MutationOp={kind:string;[field:string]:unknown}\ntype Result<T,E={code:string;message:string}>={ok:true;value:T}|{ok:false;error:E}\ntype ExternalFamilyId=`family:${string}`;interface SourceLocation{readonly line:number;readonly col:number;}interface SourceMap{readonly nodes:ReadonlyMap<string,SourceLocation>;readonly edges:ReadonlyMap<string,SourceLocation>;readonly groups:ReadonlyMap<string,SourceLocation>;readonly labels:ReadonlyMap<string,SourceLocation>;readonly spans?:SourceMapSpans;}interface SourceMapSpans{readonly preserved:PreservedSourceSpans;readonly nodes:ReadonlyMap<string,SourceSpan>;readonly edges:ReadonlyMap<string,SourceSpan>;readonly groups:ReadonlyMap<string,SourceSpan>;readonly labels:ReadonlyMap<string,SourceSpan>;readonly metadata?:ReadonlyMap<string,ReadonlyMap<string,{readonly key:SourceSpan;readonly value:SourceSpan;}>>;}interface PreservedSourceSpans{readonly source:SourceSpan;readonly wrapper?:SourceSpan;readonly frontmatter?:SourceSpan;readonly initDirectives?:readonly SourceSpan[];readonly accessibilityDirectives?:readonly SourceSpan[];readonly header:SourceSpan;readonly body:SourceSpan;}interface SourceSpan{readonly start:SourceSpanPoint;readonly end:SourceSpanPoint;}interface SourceSpanPoint{readonly offset:number;readonly line:number;readonly col:number;}interface SourcePreservationReceipt{readonly version:1;readonly classification:'unsupported'|'inventory-only'|'unknown';readonly source:string;readonly header:string;readonly upstreamFamilyId?:string;readonly mermaidVersion:string;readonly spans?:PreservedSourceSpans;}interface ParseError{readonly code:string;readonly message:string;readonly line?:number;readonly col?:number;readonly preservation?:SourcePreservationReceipt;readonly help?:string;}type RenderedRegionKind='node'|'edge'|'label'|'canvas'|'group'|'cluster'|'lane'|'band'|'compartment'|'plot'|'ring';interface RenderedRegion{id:string;kind:RenderedRegionKind;elementId?:string;parentId?:string;bounds:{x:number;y:number;w:number;h:number;};cellSpans?:Array<{row:number;start:number;end:number;}>;occludedCellSpans?:Array<{row:number;start:number;end:number;}>;sourceLine?:number;}type DiagramActionKind='href'|'call'|'callback';type DiagramActionSecurity='safe'|'unsafe'|'source-only'|'unsupported';interface DiagramActionRecord{id?:string;regionId?:string;family:DiagramKind;target:string;action:DiagramActionKind;raw:string;line?:number;href?:string;tooltip?:string;security:DiagramActionSecurity;executable:false;message?:string;}interface LayoutRect{x:number;y:number;w:number;h:number;}interface ExtensionIdentity<Kind extends string=string>{readonly id:`${Kind}:${string}`;readonly kind:Kind;readonly version:string;readonly compatibility:ExtensionCompatibility;readonly provenance:ExtensionProvenance;}interface ExtensionCompatibility{readonly[contract:string]:string|undefined;readonly core?:string;readonly scene?:string;}interface ExtensionProvenance{readonly owner:string;readonly source:string;readonly reference?:string;}type CheckMermaidSpec=readonly string[]|CheckMermaidObjectSpec;interface CheckMermaidObjectSpec{include?:readonly string[];exclude?:readonly string[];exact?:boolean;}interface CheckMermaidResult{ok:boolean;missing:string[];unexpected:string[];facts:string[];}interface CreateMermaidOptions{c4Variant?:C4Variant;direction?:Direction;}type C4Variant='C4Context'|'C4Container'|'C4Component'|'C4Dynamic'|'C4Deployment';type Direction='TD'|'TB'|'LR'|'BT'|'RL';\ninterface ValidDiagram{readonly kind:DiagramKind;readonly source:SourceMap}\ninterf",
"inputSchema": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"description": "JavaScript to execute; mermaid.* SDK is global."
},
"timeoutMs": {
"type": "integer",
"minimum": 1,
"description": "Optional CPU-time budget (default 5000ms, max 30000ms)."
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Return version-matched mutation operations for one diagram family, or use capability=resolved-scene for painted geometry, runtime limits and typed errors. Use detail=signatures for the compact op menu or detail=fields (default) for exact field types, required flags, enum values, defaults, and constraints. Call this before build, mutate, or execute when the family schema is not already known.
| Parameter | Type | Description |
|---|---|---|
| detail | string | signatures for a compact menu; fields for the complete schema (default). |
| family | string | Diagram family whose mutation operations are needed. |
| capability | string | Read-only rendering capability; use instead of family. |
{
"name": "describe_sdk",
"title": "Describe Mermaid SDK operations",
"description": "Return version-matched mutation operations for one diagram family, or use capability=resolved-scene for painted geometry, runtime limits and typed errors.\nUse detail=signatures for the compact op menu or detail=fields (default) for exact\nfield types, required flags, enum values, defaults, and constraints. Call this\nbefore build, mutate, or execute when the family schema is not already known.",
"inputSchema": {
"type": "object",
"oneOf": [
{
"required": [
"family"
]
},
{
"required": [
"capability"
]
}
],
"properties": {
"detail": {
"enum": [
"signatures",
"fields"
],
"type": "string",
"description": "signatures for a compact menu; fields for the complete schema (default)."
},
"family": {
"enum": [
"flowchart",
"state",
"sequence",
"timeline",
"class",
"er",
"journey",
"architecture",
"xychart",
"pie",
"quadrant",
"gantt",
"mindmap",
"gitgraph",
"radar",
"sankey",
"c4",
"packet",
"kanban",
"requirement",
"treemap",
"ishikawa",
"block",
"eventmodeling",
"zenuml"
],
"type": "string",
"description": "Diagram family whose mutation operations are needed."
},
"capability": {
"enum": [
"resolved-scene"
],
"type": "string",
"description": "Read-only rendering capability; use instead of family."
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Render a Mermaid source string to themeable SVG. Returns { ok, svg }. Layout is deterministic: identical input produces identical geometry. The hosted boundary forces security:'strict' and embedFontImport:false.
Schema too large to show here (60,854 characters).
{
"name": "render_svg",
"title": "Render Mermaid as SVG",
"description": "Render a Mermaid source string to themeable SVG. Returns { ok, svg }.\nLayout is deterministic: identical input produces identical geometry. The hosted\nboundary forces security:'strict' and embedFontImport:false.",
"inputSchema": {
"truncated": true,
"chars": 60854
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Render a Mermaid source string to text. Returns { ok, text }. useAscii true → plain ASCII (+,-,|); false/absent → Unicode box drawing (┌,─,│). targetWidth sets a hard terminal display-cell bound; impossible bounds return a typed error.
Schema too large to show here (60,542 characters).
{
"name": "render_ascii",
"title": "Render Mermaid as text",
"description": "Render a Mermaid source string to text. Returns { ok, text }.\nuseAscii true → plain ASCII (+,-,|); false/absent → Unicode box drawing (┌,─,│).\ntargetWidth sets a hard terminal display-cell bound; impossible bounds return a typed error.",
"inputSchema": {
"truncated": true,
"chars": 60542
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Rasterize a Mermaid source string to PNG. Returns { ok, png_base64 }. Hosted rendering uses resvg-wasm with bundled fonts; bytes may differ from the local napi renderer, so hosted PNG is a convenience surface, not part of the byte-determinism contract. For file/URL artifacts use the local stdio server.
Schema too large to show here (62,020 characters).
{
"name": "render_png",
"title": "Render Mermaid as PNG",
"description": "Rasterize a Mermaid source string to PNG. Returns { ok, png_base64 }.\nHosted rendering uses resvg-wasm with bundled fonts; bytes may differ from the\nlocal napi renderer, so hosted PNG is a convenience surface, not part of the\nbyte-determinism contract. For file/URL artifacts use the local stdio server.",
"inputSchema": {
"truncated": true,
"chars": 62020
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Parse and verify source, structure, and renderability. This runs the graphical pipeline. Returns { ok, family, summary, warnings, layout: { bounds, nodes, edges } } for valid diagrams and { ok: false, errors } for parse failures. `family` is the detected diagram family and `summary` a one-line description — check them: ok:true only means the diagram is structurally valid, not that it is the kind you intended. Warnings use the layout-rubric codes.
| Parameter | Type | Description |
|---|---|---|
| source * | string | Mermaid source. |
{
"name": "verify",
"title": "Verify Mermaid diagram",
"description": "Parse and verify source, structure, and renderability. This runs the graphical pipeline. Returns\n{ ok, family, summary, warnings, layout: { bounds, nodes, edges } } for valid\ndiagrams and { ok: false, errors } for parse failures. `family` is the detected\ndiagram family and `summary` a one-line description — check them: ok:true only\nmeans the diagram is structurally valid, not that it is the kind you intended.\nWarnings use the layout-rubric codes.",
"inputSchema": {
"type": "object",
"required": [
"source"
],
"properties": {
"source": {
"type": "string",
"description": "Mermaid source."
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Describe a Mermaid diagram. format=text returns { ok, text } with one or two summary sentences; format=json returns { ok, tree } with the AX tree; format=facts returns { ok, facts } with deterministic semantic fact lines for machine checking (for example edge A -> B : label, member Duck +quack()).
| Parameter | Type | Description |
|---|---|---|
| format | string | text (default), json AX tree, or facts semantic read-back. |
| source * | string | Mermaid source. |
{
"name": "describe",
"title": "Describe Mermaid diagram",
"description": "Describe a Mermaid diagram. format=text returns { ok, text } with\none or two summary sentences; format=json returns { ok, tree } with the AX tree;\nformat=facts returns { ok, facts } with deterministic semantic fact lines for\nmachine checking (for example edge A -> B : label, member Duck +quack()).",
"inputSchema": {
"type": "object",
"required": [
"source"
],
"properties": {
"format": {
"enum": [
"text",
"json",
"facts"
],
"type": "string",
"description": "text (default), json AX tree, or facts semantic read-back."
},
"source": {
"type": "string",
"description": "Mermaid source."
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Apply a list of structured edit ops to an existing Mermaid `source` and return the edited diagram. This is the declarative counterpart to `execute`: plain JSON in, plain JSON out, no sandbox. Prefer it for straightforward edits; reserve `execute` for logic the ops don't express. Returns { ok, family, source, verify:{ ok, warnings } } on success, or { ok:false, family, opIndex, error } — where `error` names the offending field and lists the valid ones — when an op is malformed or cannot apply. Ops apply in order and are all-or-nothing: the first failing op stops the batch (its position is `opIndex`) and the input is left untouched. Each op is { "kind": <op>, …fields }. Call `describe_sdk` for the detected family before authoring unfamiliar ops; it returns compact signatures or exact field types, enum values, defaults, and constraints. Set mode to source-preserving for supported edits to opaque Class or Flowchart source. Exact edited bytes and portability warnings are retained; unsupported operations still fail atomically. This mode does not promise portable export.
| Parameter | Type | Description |
|---|---|---|
| ops * | array | Non-empty ordered list of edit ops; each is { kind, ...fields }. |
| mode | string | Source-preserving mode edits owned source ranges without regenerating unsupported syntax. |
| source * | string | Mermaid source to edit. |
{
"name": "mutate",
"title": "Edit Mermaid diagram",
"description": "Apply a list of structured edit ops to an existing Mermaid `source` and\nreturn the edited diagram. This is the declarative counterpart to `execute`:\nplain JSON in, plain JSON out, no sandbox. Prefer it for straightforward edits;\nreserve `execute` for logic the ops don't express.\nReturns { ok, family, source, verify:{ ok, warnings } } on success, or\n{ ok:false, family, opIndex, error } — where `error` names the offending field\nand lists the valid ones — when an op is malformed or cannot apply. Ops apply in\norder and are all-or-nothing: the first failing op stops the batch (its position\nis `opIndex`) and the input is left untouched.\nEach op is { \"kind\": <op>, …fields }. Call `describe_sdk` for the detected\nfamily before authoring unfamiliar ops; it returns compact signatures or exact\nfield types, enum values, defaults, and constraints.\nSet mode to source-preserving for supported edits to opaque Class or Flowchart\nsource. Exact edited bytes and portability warnings are retained; unsupported\noperations still fail atomically. This mode does not promise portable export.",
"inputSchema": {
"type": "object",
"required": [
"source",
"ops"
],
"properties": {
"ops": {
"type": "array",
"items": {
"type": "object"
},
"minItems": 1,
"description": "Non-empty ordered list of edit ops; each is { kind, ...fields }."
},
"mode": {
"enum": [
"structured",
"source-preserving"
],
"type": "string",
"default": "structured",
"description": "Source-preserving mode edits owned source ranges without regenerating unsupported syntax."
},
"source": {
"type": "string",
"description": "Mermaid source to edit."
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Author a new Mermaid diagram from blank by folding a list of structured ops over an empty diagram of `family`. The declarative counterpart to hand-writing source. Returns the same envelope as `mutate`: { ok, family, source, verify } or { ok:false, family, opIndex, error }. Call `describe_sdk` for the family before authoring unfamiliar ops.
| Parameter | Type | Description |
|---|---|---|
| ops * | array | Non-empty ordered list of ops; each is { kind, ...fields }. |
| family * | string | Diagram family to author (one of: zenuml, eventmodeling, flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar, sankey, c4, packet, kanban, requirement, treemap, ishikawa, block). |
{
"name": "build",
"title": "Build Mermaid diagram",
"description": "Author a new Mermaid diagram from blank by folding a list of structured ops\nover an empty diagram of `family`. The declarative counterpart to hand-writing\nsource. Returns the same envelope as `mutate`:\n{ ok, family, source, verify } or { ok:false, family, opIndex, error }.\nCall `describe_sdk` for the family before authoring unfamiliar ops.",
"inputSchema": {
"type": "object",
"required": [
"family",
"ops"
],
"properties": {
"ops": {
"type": "array",
"items": {
"type": "object"
},
"minItems": 1,
"description": "Non-empty ordered list of ops; each is { kind, ...fields }."
},
"family": {
"type": "string",
"description": "Diagram family to author (one of: zenuml, eventmodeling, flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar, sankey, c4, packet, kanban, requirement, treemap, ishikawa, block)."
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}agentic-mermaid hosted MCP server (stateless). Direct tools render_svg, render_ascii, render_png, verify, and describe cover plain render/verify calls cheaply. Successful deterministic pure-tool results may be reused by a private server-side compute cache for up to 24 hours; execute, mutate, and build bypass it. HTTP /mcp responses themselves are cache-control: no-store, so clients must not infer response freshness from CDN headers. The x-agentic-mermaid-compute-cache response header reports hit, miss, mixed, bypass, or disabled. There is no layout seed — the library's optional style seed only re-rolls ink of styled looks. describe_sdk progressively discloses one family's version-matched mutation schema. Declarative mutate/build apply typed op lists and verify before emitting source; prefer them for straightforward structured edits. execute runs synchronous JavaScript against the typed mermaid.* SDK in an isolated on-demand sandbox for logic the ops don't express; async/await and Promise jobs are not supported, and network access is disabled. Inputs are capped at 64KB; for bigger diagrams, Code Mode artifacts, or file/URL PNG output, run the local stdio server (see https://agentic-mermaid.dev/docs/mcp/).
Names, descriptions and schemas were written by the server and are shown as data.