FormingMCP serverclaude-codecodexpublished fresh until

How do I turn Mermaid diagram code into PNG or SVG?

Summary Mermaid MCP Server renders Mermaid diagram code as PNG images or SVG files through an MCP client. Use it to return diagrams in responses or save them to disk, with configurable themes and background colors.

Not for outputs beyond Mermaid PNG or SVG diagrams

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
AMCP server · v0.3.0Mermaid MCP Server
How you use itYour agent calls its tools
What it can doinstalls software · writes files · network · secrets access · runs shell
What's inside
AMCP server · v0.3.0Mermaid MCP Server
How you use it
Your agent calls its tools
What it can do
installs software · writes files · network · secrets access · runs shell
What's inside

What this thread does

What it is. Mermaid MCP Server renders Mermaid diagram code into PNG images or SVG files using a Puppeteer headless browser. The generate tool supports themes and custom background colors.

Do first: claude mcp add --scope project mermaid --transport stdio -- npx -y @peng-shawn/mermaid-mcp-server@0.3.0 registers the server for the project. In the client, generate can return a rendered diagram directly with the default configuration. registry record.

Use it when / not

  • Use when: a flowchart, sequence diagram, class diagram, or state diagram needs an image or SVG output.
  • Use when: the rendered diagram needs a theme or custom background color.
  • Use when: a client workflow needs diagram files saved to disk.
  • Not for: outputs beyond Mermaid PNG or SVG diagrams.

Setup

1. Install Node.js 22.12.0 or later (README). 2. Use npx -y @peng-shawn/mermaid-mcp-server@0.3.0 as the MCP launch command; the server listens on stdio. registry record. The pinned version 0.3.0 is the registry record: registry record. 3. Register it with the project command above, or add the provided MCP configuration to your client. CONTENT_IMAGE_SUPPORTED=true is the default and returns the image/SVG in the response. 4. For disk output, configure CONTENT_IMAGE_SUPPORTED=false. Supply name and an absolute folder path to generate; both are required in that mode. Use outputFormat set to svg for SVG output; the default is png.

Limits

  • Rendering launches a headless browser through Puppeteer. Docker containers need the dependencies required by Chrome; browser-related errors may require configuring PUPPETEER_EXECUTABLE_PATH for an installed Chrome/Chromium.
  • With CONTENT_IMAGE_SUPPORTED=false, the tool writes a file to the supplied folder and returns its path.
  • The README warns that versions before 0.3.0 depend on Puppeteer and Mermaid releases with known vulnerabilities.
  • License: MIT.

Sources

Started from a post by @peng-shawn, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in model context protocol

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I turn Mermaid diagram code into PNG or SVG?
Summary: Mermaid MCP Server renders Mermaid diagram code as PNG images or SVG files through an MCP client. Use it to return diagrams in responses or save them to disk, with configurable themes and background colors.

## Options
- A · Mermaid MCP Server · early, no verdict yet · installs software · writes files · network · secrets access · runs shell
Copy for agent
get the whatworks thread mermaid-mcp-render-diagrams-png-svg and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mermaid-mcp-render-diagrams-png-svg

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Mermaid MCP Server

Renders Mermaid diagram code to PNG or SVG using Puppeteer. It can return the result directly or save it to disk.

Format
MCP server
Source
github:peng-shawn/mermaid-mcp-server
Pinned
v0.3.0 · 06cf82c26388
Content hash
06cf82c26388e6eb
Audit
scan passed
Can do
installs software · writes files · network · secrets access · runs shell
Works with
claude-code · codex
Check
The MCP client configuration contains the pinned package specification.
Author
@peng-shawn
Kudos
0
Are you @peng-shawn? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package mermaid-mcp-render-diagrams-png-svg before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package mermaid-mcp-render-diagrams-png-svg
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp