
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server that converts Mermaid diagram code into PNG images or SVG files, with support for themes, background colors, and returning or saving output.
Mermaid MCP Server is cataloged as an MCP server attributed to peng-shawn. An MCP server that converts Mermaid diagram code into PNG images or SVG files, with support for themes, background colors, and returning or saving output. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Mermaid MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes, it supports themes (default, forest, dark, neutral) and customizable background colors.
Because Cursor does not yet support inline images in responses, the server saves images to disk instead.
README.md · 06cf82c26388 · Fetched 2026-11-13 08:51:58 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
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.
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:
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
@latestsonpxpicks up new releases.
npx tsc
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": ["-y", "@peng-shawn/mermaid-mcp-server@latest"]
}
}
}
env CONTENT_IMAGE_SUPPORTED=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 the server with inspector for testing and debugging:
npx @modelcontextprotocol/inspector node dist/index.js
The server will start and listen on stdio for MCP protocol messages.
Learn more about inspector here.
To install Mermaid Diagram Generator for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @peng-shawn/mermaid-mcp-server --client claude
When running in Docker containers (including via Smithery), you may need to handle Chrome dependencies:
The server now attempts to use Puppeteer's bundled browser by default
If you encounter browser-related errors, you have two options:
Option 1: During Docker image build:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true when installing PuppeteerPUPPETEER_EXECUTABLE_PATH at runtime to point to the Chrome installationOption 2: Use Puppeteer's bundled Chrome:
PUPPETEER_SKIP_CHROMIUM_DOWNLOADFor Smithery users, the latest version should work without additional configuration.
The server exposes a single tool:
generate: Converts Mermaid diagram code to a PNG image or SVG file
code: The Mermaid diagram code to rendertheme: (optional) Theme for the diagram. Options: "default", "forest", "dark", "neutral"backgroundColor: (optional) Background color for the diagram, e.g. 'white', 'transparent', '#F0F0F0'outputFormat: (optional) Output format for the diagram. Options: "png", "svg" (defaults to "png")name: Name for the generated file (required when CONTENT_IMAGE_SUPPORTED=false)folder: Absolute path to save the image/SVG to (required when CONTENT_IMAGE_SUPPORTED=false)The behavior of the generate tool depends on the CONTENT_IMAGE_SUPPORTED environment variable:
CONTENT_IMAGE_SUPPORTED=true (default): The tool returns the image/SVG directly in the responseCONTENT_IMAGE_SUPPORTED=false: The tool saves the image/SVG to the specified folder and returns the file pathCONTENT_IMAGE_SUPPORTED: Controls whether images are returned directly in the response or saved to disk
true (default): Images are returned directly in the responsefalse: Images are saved to disk, requiring name and folder parameters// Generate a flowchart with default settings
{
"code": "flowchart TD\n A[Start] --> B{Is it?}\n B -->|Yes| C[OK]\n B -->|No| D[End]"
}
// Generate a sequence diagram with forest theme and light gray background
{
"code": "sequenceDiagram\n Alice->>John: Hello John, how are you?\n John-->>Alice: Great!",
"theme": "forest",
"backgroundColor": "#F0F0F0"
}
// Generate a class diagram and save it to disk as PNG
{
"code": "classDiagram\n Class01 <|-- AveryLongClass\n Class03 *-- Class04\n Class05 o-- Class06",
"theme": "dark",
"name": "class_diagram",
"folder": "/path/to/diagrams"
}
// Generate a state diagram as SVG
{
"code": "stateDiagram-v2\n [*] --> Still\n Still --> [*]\n Still --> Moving\n Moving --> Still\n Moving --> Crash\n Crash --> [*]",
"outputFormat": "svg",
"name": "state_diagram",
"folder": "/path/to/diagrams"
}
Yes, but it doesn't support the theme and backgroundColor options. Plus, having a dedicated server makes it easier to create mermaid diagrams with different MCP clients.
Cursor doesn't support inline images in responses yet.
This project uses GitHub Actions to automate the publishing process to npm.
Make sure all your changes are committed and pushed
Run the release script with either a specific version number or a semantic version increment:
# Using a specific version number
npm run release 0.1.4
# Using semantic version increments
npm run release patch # Increments the patch version (e.g., 0.1.3 → 0.1.4)
npm run release minor # Increments the minor version (e.g., 0.1.3 → 0.2.0)
npm run release major # Increments the major version (e.g., 0.1.3 → 1.0.0)
The script will:
git tag v0.1.4 # Use the appropriate version number
git push origin v0.1.4
Note: You need to set up the NPM_TOKEN secret in your GitHub repository settings. To do this:
NPM_TOKEN with your npm token as the valueMIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Mermaid MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mermaid-diagram-generator)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.