home / mcp / mcp mermaid server

MCP Mermaid Server

Generates Mermaid diagrams from AI inputs and exports visuals in multiple formats via MCP transports.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can generate dynamic Mermaid diagrams and charts using AI with MCP Mermaid. This server lets you produce rich Mermaid syntax and visuals, export options, and flexible transports to fit your workflow and tooling.

How to use

You integrate MCP Mermaid with your MCP client to generate Mermaid diagrams. Start the server using your preferred transport and then request diagrams through the MCP channel. You can leverage local development or a globally installed package to run the server and connect it to your AI or automation environment.

How to install

Prerequisites: ensure you have Node.js and npm installed on your system.

Global installation option: install the MCP Mermaid package globally so you can run the server from anywhere.

Local development option: clone the project repository, install dependencies, build, and start the server using the provided npm scripts.

Additional notes

The server supports multiple transport options for communication, including standard streams, Server-Sent Events (SSE), and a streamable HTTP transport. You can configure the client to connect via the endpoint that matches your chosen transport.

CLI options let you customize the transport, port, and endpoint. Review the available options to tailor the server to your environment.

Available tools

Mermaid generation

Creates diagrams by converting AI-driven inputs into valid Mermaid syntax and visuals.

Export formats

Exports results to base64, svg, mermaid, file, and remote-friendly svg_url or png_url formats with syntax validation.

Transport integration

Supports SSE, streamable HTTP, and stdio transports for flexible client connectivity.

CLI configuration

Provides command line options to customize transport, port, and endpoint for MCP clients.