MCP Directory

How to add MCP Mermaid to Cursor

Generate Mermaid diagrams and charts with AI dynamically, exporting to SVG, PNG, base64, file, or shareable URLs. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 588 · stdio · no auth

Cursor config for MCP Mermaid

npx -y mcp-mermaid
{
  "mcpServers": {
    "mcp-mermaid": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mermaid"
      ]
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the MCP Mermaid config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of MCP Mermaid's tools to confirm it's connected.

Before you start

  • Node.js with npx (or a global `npm install -g mcp-mermaid`)
  • Optional: Docker, to run the published susuperli/mcp-mermaid image

What MCP Mermaid can do in Cursor

generate_mermaid_diagram

Generate a Mermaid diagram or chart from Mermaid syntax. Supports configuring backgroundColor and theme, and exporting to base64, svg, mermaid, file, svg_url, or png_url. Use outputType: "file" to save a PNG to disk, or the URL modes to produce shareable mermaid.ink links. Mermaid source is validated to support multi-round correction. (Tool functionality described in the README; exact tool name is not literally stated there.)

Security

Output modes svg_url and png_url upload/share diagrams via public mermaid.ink links; avoid them for sensitive content and prefer file, svg, or base64 output.

MCP Mermaid + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the MCP Mermaid config there under the "mcpServers" key and restart the client.

Is MCP Mermaid safe to use with Cursor?

Output modes svg_url and png_url upload/share diagrams via public mermaid.ink links; avoid them for sensitive content and prefer file, svg, or base64 output.

Which output formats are supported?

base64, svg, mermaid, file, and the remote-friendly svg_url and png_url. Use outputType: "file" to automatically save PNG diagrams to disk.

What transports does it support?

stdio by default, plus SSE (default endpoint /sse, port 3033) and Streamable HTTP (default endpoint /mcp, port 1122). Transport, port, and endpoint are configurable via the -t, -p, and -e CLI options.

Can I run it with Docker?

Yes. Pull susuperli/mcp-mermaid:latest and run it with --transport sse (default) or --transport streamable --port 1122.

View repo Full MCP Mermaid page