Free Mermaid diagrams
for you and your agent.

Create, edit, and share diagrams in your browser, through the REST API, or with your agent over MCP. Keep drafts private and publish when you’re ready.

Get an API key Connect your agent

Free plan: 100 saved diagrams · 200 API renders per month.

Request
const source = "flowchart LR\n  App --> API\n  API --> Cache\n  API --> Worker\n  Worker --> Database";

const response = await fetch("https://www.mermaiddesk.com/api/v1/mermaid/render", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ source, format: "svg" }),
});
const svg = await response.text();

Run on your server with Node.js 20 or later and a TypeScript runner. Replace YOUR_API_KEY with your key. Read the SVG from svg.

architecture.svgBrowser preview
Your browser renders this example without an API call.Try the editor
  • Check Mermaid syntax
  • Keep your diagrams private
  • Export SVG, PNG & PDF
  • Share public snapshots

From first draft
to published diagram.

Map your architecture, explain a pull request, or illustrate a runbook. Keep the source editable as your system changes.

Give your agent diagram tools.
Connect your agent through MCP to create and update diagrams. Validate the Mermaid source so your agent can find and fix syntax errors.
Build diagrams into your workflow.
Render SVG, PNG, or PDF from your code. Open any saved diagram in your browser to refine it.
Share when you are ready.
Publish a snapshot with a public link and downloads. Later edits stay private until you publish again.

Your code. Your agent. One key.

Connect through REST or MCP with the permissions you choose.

Add diagrams to your app.

Turn Mermaid source into files your app can use. Save diagrams privately or publish a snapshot to share.

Read the API guide
  1. Create an API key in account settings. Select MERMAID_RENDER to validate and render source.
  2. Send the key in your Authorization: Bearer header. The example above returns SVG you can use in your app.
  3. Add read and write permissions to save and edit diagrams. Add share permission to publish snapshots.
POST/api/v1/mermaid/render

Connect your agent.

Use an MCP client that supports Streamable HTTP and custom authorization headers.

Read the MCP guide
Server URL
https://www.mermaiddesk.com/api/mcp
Transport
Streamable HTTP
Header
Authorization: Bearer mdsk_…
Permissions
DIAGRAMS_READ, DIAGRAMS_WRITE, MERMAID_RENDER

Store your API key in the client’s secret settings. Use the key in place of mdsk_…. The key’s permissions control which tools appear. Add DIAGRAMS_SHARE to publish snapshots. MCP requires a bearer key. It does not support browser sign-in or OAuth.

See what your agent can do
  • list_diagrams / get_diagram — find and read
  • create_diagram / update_diagram — save and edit
  • validate_mermaid / render_mermaid — check and render
  • export_diagram — get the source or a diagram file
  • publish_diagram / revoke_diagram_publication — manage public snapshots
  • delete_diagram — permanently delete a diagram

Edit the source. See the diagram.

Make a change below and see the result. Edit and export without an account.

Mermaid syntax
Guest draft

Mermaid editor

Edit or export here. Sign in to save.

Mermaid source

Give your agent
diagram tools.

Get an API key

Create a key, choose its permissions, and connect.