API & MCP
Everything a person can do on Sketchboard Mermaid to Diagram, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://sketchboardmermaidtodiagram.usefulweb.app/api/v1/calculate– run Sketchboard Mermaid to DiagramGET https://sketchboardmermaidtodiagram.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Sketchboard Mermaid to Diagram
Parses the flowchart part of Mermaid (directions, node shapes, labelled and dotted links, chains, subgraphs), places the nodes with a layered layout so few lines cross, routes the connectors around the boxes and returns an SVG plus a Sketchboard board where every box and arrow can be moved and restyled.
| Field | Type | Default | Description |
|---|---|---|---|
mermaid | textarea | — | Mermaid flowchart. Starts with “flowchart TD” (or graph LR …). One link per line, for example A[Start] --> B{OK?}. |
direction | select (, TB, LR, BT, RL) | — | Direction |
route | select (elbow, straight, curved) | "elbow" | Connector style |
style | select (clean, sketchy, file) | "clean" | Drawing style |
Example request
Sign-up flow with decisions
curl -X POST https://sketchboardmermaidtodiagram.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"mermaid":"flowchart TD\n start([Visitor opens the sign-up page]) --> form[Fill in name and e-mail]\n form --> valid{Is the e-mail valid?}\n valid -- no --> err[Show a clear error message] --> form\n valid -- yes --> exists{Account exists already?}\n exists -- yes --> login[Offer to sign in instead]\n exists -- no --> create[(Create the account)]\n create --> mail[Send the welcome e-mail]\n mail --> done([Show the dashboard])\n login --> done"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://sketchboardmermaidtodiagram.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
sketchboard_mermaid_to_diagram - Local stdio connector:
node src/mcp-stdio.ts --tool=sketchboard-mermaid-to-diagram
{
"mcpServers": {
"sketchboard-mermaid-to-diagram": { "type": "http", "url": "https://sketchboardmermaidtodiagram.usefulweb.app/mcp" }
}
}