
Mermaid MCP Server by hustcc: Setup for Claude, Cursor and More
Lets Claude and Cursor turn Mermaid diagram code into images, SVG or share links.
This is a community server by hustcc, not made by the Mermaid project. It has one tool that renders Mermaid diagram code and returns the picture, the SVG, or a link on the public mermaid.ink site. It runs on your computer with no account or API key. Installing it downloads a Chromium browser, which it uses to draw the diagrams.
Good for
- Developers who want flowcharts and sequence diagrams drawn from a description
- Writers adding diagrams to docs and READMEs
- Teams who want checked Mermaid syntax before pasting it in a wiki
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Local-only server; ChatGPT cannot reach it.
Local-only server; n8n cannot reach it.
Install mcp-mermaid
Claude Code
- 1
Copy this prompt.
Add the mcp-mermaid server to Claude Code. Run this command: claude mcp add mermaid -- npx -y mcp-mermaid Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
Built from the package data we hold. Not yet tested by us.
Tools
Draws a diagram from Mermaid text and returns it as an image, SVG or link
Takes Mermaid diagram code and renders it in a headless browser. You pick a theme and background color, and whether you get a PNG image, SVG markup, the text back, a saved PNG file, or a public mermaid.ink link.
Try: “Draw a flowchart of our signup flow as a dark-theme diagram and save it as a PNG file.”
Runs code ·
generate_mermaid_diagram
Read from the source code
Permissions
high risk · 5 things to watch · 1 advisory
High risk
The server renders diagrams locally and can save PNG files to the folder it runs in. Pin the package to version 0.4.1, because two later npm versions were malicious.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
Avoid mcp-mermaid 0.5.1 and 0.6.1: both were malicious
Versions 0.5.1 and 0.6.1 were published on 19 May 2026 and flagged as malware (MAL-2026-4147) in a supply-chain attack. npm no longer lists them. Today the latest tag on npm is 0.4.1, so npx -y mcp-mermaid and the README config (which has no version pin) resolve to 0.4.1. Our advice: pin mcp-mermaid@0.4.1 and check the latest tag before upgrading, in case a newer version is published. osv.dev
Install downloads a Chromium browser
The package runs a post-install step that downloads Chromium with its system dependencies. Expect a large download and, on Linux, a request for extra system packages. registry.npmjs.org
The file output writes PNGs to your working folder
With the file output type it saves a timestamped PNG in the folder the server was started from. The default output writes nothing. github.com
Link outputs go through a public site
The svg_url and png_url options return mermaid.ink addresses that hold your diagram text in the URL. Do not use them for diagrams that contain private details. github.com
Network modes listen on every interface by default
If you start it with the sse or streamable option and no host, it listens on all network interfaces with no sign-in. Pass a host of 127.0.0.1 or stay with the default stdio mode. github.com
Technical details
| Turning on read-only | None documented. The default output returns an image and writes nothing; the file output type saves a PNG to the working folder. |
|---|---|
| Talks to | mermaid.ink (only when you ask for a link; the link is built on your machine and the diagram text is encoded in the URL) |
| Sign-in and keys | No account or API key. |
Questions
Is the Mermaid MCP server official?
No. It is a community server by hustcc and is not made by the Mermaid project.
Is it safe to install from npm?
Version 0.4.1 is not listed in the advisory. Versions 0.5.1 and 0.6.1 were malicious (MAL-2026-4147) and should never be installed. npm has removed them, and the latest tag points to 0.4.1 today, so the unpinned npx command in the README gets 0.4.1. Pin mcp-mermaid@0.4.1 so a later republish cannot change what runs.
Does it need an API key?
No. It runs on your computer and needs no account or key.
Which clients does it work in?
Any app that can start a local server, such as Claude Desktop, Claude Code, Cursor, VS Code and Cline. It is local only, so ChatGPT and n8n cannot connect to it. See the install box for each app.
What output formats can it make?
A PNG image, SVG markup, the Mermaid text back, a PNG file saved to disk, or a public mermaid.ink link to an SVG or PNG. The default is a PNG image.
Can it run read-only?
There is no read-only switch, but the default output writes nothing. Only the file output type saves a PNG, and it saves it to the folder the server started in.
Why does installing take so long?
The package downloads a Chromium browser in a post-install step, because diagrams are drawn in a headless browser.
Does the Mermaid team make its own MCP server?
Yes, Mermaid Chart, the company behind Mermaid, runs a hosted Mermaid MCP Server at https://mcp.mermaid.ai/mcp. Its docs say every tool call needs a Mermaid account (free to sign up) and that it also manages diagrams in your Mermaid projects. The hustcc server on this page is a separate community project: it runs on your computer, needs no account and has one tool. The open-source mermaid-js GitHub organization has no MCP server.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
mcp-mermaid- Registry
- npm
- Endpoint
https://server.smithery.ai/@hustcc/mcp-mermaid/mcp- Transport
- stdio
- Auth
- None
- Version
- 0.4.1
- License
- MIT
- Last commit
- May 15, 2026
- Open issues
- 9
- Listed in
- Official MCP registry
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 6Hide
- github.com · github.com
- github.com · github.com
- github.com · github.com
- osv.dev · osv.dev
- registry.npmjs.org · registry.npmjs.org
- docs.mermaidchart.com · docs.mermaidchart.com