Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Mermaid MCP Server

MCP server by peng-shawn Verified · npm:@mseep

Mermaid MCP Server converts Mermaid diagram code into PNG images or SVG files for AI assistants. It suits anyone who wants to generate visual diagrams from text descriptions in an MCP client.

  • Score 76
  • 234 stars
  • 9 a week
  • MIT
  • Updated

Install Mermaid MCP Server

Built from the published package, never by AI.

claude mcp add mermaid-mcp-server -- npx -y @mseep/mermaid-mcp-server

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Mermaid MCP Server in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mermaid-mcp-server block.

About

Mermaid MCP Server is a Model Context Protocol server that turns Mermaid diagram code into PNG images or SVG files. It exposes a single tool, generate, so AI assistants and other applications can create diagrams from text. The server supports the themes default, forest, dark and neutral, and it accepts a custom background color.

The server uses Puppeteer to launch a headless browser, load Mermaid.js, and render the diagram. It then saves the result as SVG or takes a PNG screenshot. Depending on the CONTENT_IMAGE_SUPPORTED setting, the image is returned directly in the response or saved to a folder that the user specifies. The project is aimed at users of MCP clients such as Claude desktop, Cursor and Cline.

Written from the project's README and checked against it.

Tools it gives your assistant

  • generateConverts Mermaid diagram code to a PNG image or SVG file.

What you need

  • Node.js 22.12.0 or later
  • Puppeteer for headless browser rendering
  • Docker users may need Chrome dependencies

Try asking

  • Render this Mermaid flowchart as a PNG with the forest theme.
  • Create a sequence diagram of my login flow as an SVG file.
  • Save this class diagram as a PNG in my diagrams folder.

Good to know

  • Versions before 0.3.0 depend on Puppeteer and Mermaid releases with known vulnerabilities.
  • Cursor does not support inline images, so CONTENT_IMAGE_SUPPORTED=false is needed with it.
  • When CONTENT_IMAGE_SUPPORTED=false, name and folder parameters are required.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Mermaid MCP Server

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

Mermaid MCP Server: common questions

Does Claude desktop already render Mermaid diagrams?

The source says Claude desktop supports Mermaid via canvas, but it does not support the theme and backgroundColor options. This server adds those options and works with other MCP clients.

Why set CONTENT_IMAGE_SUPPORTED to false for Cursor?

The source says Cursor does not support inline images in responses yet. Setting the variable to false makes the server save the file to disk and return the file path instead.

Can the server output SVG instead of PNG?

Yes. The generate tool accepts an outputFormat parameter with the options png and svg, and png is the default.

How do I install Mermaid MCP Server?

In Claude Code run claude mcp add mermaid-mcp-server -- npx -y @mseep/mermaid-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Mermaid MCP Server the official server?

Mermaid MCP Server is published by npm:@mseep from its verified domain in the official MCP Registry.

Is Mermaid MCP Server free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Mermaid MCP Server safe to use?

It scores 76 of 100. Grades: maintenance B, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Mermaid MCP Server?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does Mermaid MCP Server work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Mermaid MCP Server Install

Add to stack

Loading.