MCP Server

v1.1.0

Mermaid AI Playground — MCP Server

Connect to generate, fix, enhance, and render any Mermaid diagram via the Model Context Protocol.

Quick Connect

MCP Endpoint
https://www.mermaid.help/api/mcp
Health Check
https://www.mermaid.help/api/mcp/health
No authentication required · Transport: Streamable HTTP · JSON-RPC 2.0

Use with ChatGPT Apps

1

Open ChatGPT → Explore GPTs → Create a GPT

Or open an existing GPT you want to enhance with diagrams.

2

Go to Configure → Actions → Create new action

Or add an MCP server under the "Tools" section if available.

3

Add the MCP endpoint URL

https://www.mermaid.help/api/mcp
4

Set Authentication to "None"

The server is open and requires no API keys.

5

Save and start using!

Ask your GPT to "generate a flowchart of the user login flow" and it will create and render diagrams.

Use with MCP Clients

Claude Desktop / Cursor / Windsurf

Add this to your MCP client config file:

{
  "mcpServers": {
    "mermaid-ai-playground": {
      "url": "https://www.mermaid.help/api/mcp"
    }
  }
}

cURL Test

curl -X POST https://www.mermaid.help/api/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

Available Tools

generate_mermaid_diagram

Generate Mermaid code from a natural-language prompt

Params: prompt, diagramType?, complexity?

fix_mermaid_diagram

Fix broken Mermaid syntax while preserving intent

Params: code, error?

enhance_mermaid_diagram

Improve structure and readability of existing diagrams

Params: code, goal?

render_mermaid_diagram

Render Mermaid code in an interactive accessible widget

Params: mermaidCode, title?, diagramType?

list_diagram_capabilities

List supported features and recommended workflow

Params: none

All 22 Supported Diagram Types

flowchartsequenceclassstateerganttjourneypiegitGraphtimelinemindmapquadrantChartrequirementsankeyblockpacketkanbanarchitecturexychartc4zenuml