Independent by design · no pay-to-rank placements  · How we evaluate tools →
Anclum Submit
P

peng-shawn/mermaid-mcp-server

Render a Mermaid diagram to PNG

Before you install: no copy-paste command · no license recorded · link reachable

First step: npx tsc

View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
Client config (built from the install command this repo gives)
{
  "mcpServers": {
    "peng-shawn-mermaid-mcp-server": {
      "command": "npx",
      "args": ["-y", "@peng-shawn/mermaid-mcp-server@latest"]
    }
  }
}

Parsed from the README we fetched on 2026-11-05; we have not executed it.

command/args come from the install command the repository states. When it is ambiguous, the project README wins.
VS Code (.vscode/mcp.json - the key is servers)
{
  "servers": {
    "peng-shawn-mermaid-mcp-server": {
      "command": "npx",
      "args": ["-y", "@peng-shawn/mermaid-mcp-server@latest"]
    }
  }
}
Same server, but VS Code keeps it under <code>servers</code>.
Claude Code (command line)
claude mcp add --transport stdio peng-shawn-mermaid-mcp-server -- npx -y @peng-shawn/mermaid-mcp-server@latest
Claude Code does not read a config file; add the server with this command.
Key names differ by client: Clients & CLI
Source
collected from the abordage/awesome-mcp list · type: MCP server
Harvest history
first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
Score
score 1,003 · 10 sources · mcp
Install
npx -y @peng-shawn/mermaid-mcp-server@latest
FAQ (answers come from our records)
How do I install it?
The repository provides this install command: npx -y @peng-shawn/mermaid-mcp-server@latest. It comes from the repository itself; we cannot guarantee it runs as-is in your client.
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.

# Mermaid MCP Server

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images or SVG files. This server allows AI assistants and other applications to generate visual diagrams from textual descriptions using the Mermaid markdown syntax.
## Features
Converts Mermaid diagram code to PNG images or SVG files
Supports multiple diagram themes (default, forest, dark, neutral)
Customizable background colors
Uses Puppeteer for high-quality headless browser rendering
Implements the MCP protocol for seamless integration with AI assistants
Flexible output options: return images/SVG directly or save to disk
Error handling with detailed error messages
## How It Works
The server uses Puppeteer to launch a headless browser, render the Mermaid diagram to SVG, and optionally capture a screenshot of the rendered diagram. The process involves:
1. Launching a headless browser instance
2. Creating an HTML template with the Mermaid code
3. Loading the Mermaid.js library
4. Rendering the diagram to SVG
5. Either saving the SVG directly or taking a screenshot as PNG
6. Either returning the image/SVG directly or saving it to disk
## Requirements
Node.js 22.12.0 or later
> Security notice: versions before 0.3.0 depend on Puppeteer and Mermaid releases with known vulnerabilities. Please upgrade to 0.3.0 or later. The configurations below use @latest so npx picks up new releases.
## Build
bash
npx tsc
## Usage
### Use with Claude desktop
json
"mcpServers": {
"mermaid": {
"command": "npx",
"args": ["-y", "@peng-shawn/mermaid-mcp-server@latest"]
### Use with Cursor and Cline
bash
env CONTENTIMAGESUPPORTED=false npx -y @peng-shawn/mermaid-mcp-server@latest
You can find a list of mermaid diagrams under ./diagrams, they are created using Cursor agent with prompt: "generate mermaid diagrams and save them in a separate diagrams folder explaining how renderMermaidPng work"
### Run with inspector
Run the server with inspector for testing and debugging:
bash
npx @modelcontextprotocol/inspector node dist/index.js
The server will start and listen on stdio for MCP protocol messages.
Learn more about inspector here.
### Installing via Smithery
To install Mermaid Diagram Generator for Claude Desktop automatically via Smithery:
bash
npx -y @smithery/cli install @peng-shawn/mermaid-mcp-server --client claude
### Docker and Smithery Environments
When running in Docker containers (including via Smithery), you may need to handle Chrome dependencies:
1. The server now attempts to use Puppeteer's bundled browser by default
2. If you encounter browser-related errors, you have two options:
Option 1: During Docker image build:
Set PUPPETEERSKIPCHROMIUMDOWNLOAD=true when installing Puppeteer
Install Chrome/Chromium in your Docker container
Set PUPPETEEREXECUTABLEPATH at runtime to point to the Chrome installation
Option 2: Use Puppeteer's bundled Chrome:
Ensure your Docker container has the necessary dependencies for Chrome
No need to set PUPPETEERSKIPCHROMIUMDOWNLOAD
The code will use the bundled browser automatically
For Smithery users, the latest version should work without additional configuration.
## API
The server exposes a single tool:
generate: Converts Mermaid diagram code to a PNG image or SVG file
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[![Listed on Anclum](https://anclum.com/badge/listed.svg)](https://anclum.com/en/s/peng-shawn-mermaid-mcp-server/)
Source
awesome · https://github.com/peng-shawn/mermaid-mcp-server
Browse by field
MCP servers
Listed by
10 independent sources
added
today

More like this

All 6,229 →

Filed under

Every tag opens the full list for that filter. Counts are the live catalogue figures.

Browse all fields →

← Back to index