Mermaid MCP Server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images

Local serverstdioGo

What is the Mermaid MCP Server?

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images

What it actually does

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.

  • 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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
generateConverts Mermaid diagram code to a PNG image or SVG file
theme(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")
nameName for the generated file (required when CONTENT_IMAGE_SUPPORTED=false)
folderAbsolute path to save the image/SVG to (required when CONTENT_IMAGE_SUPPORTED=false)

How to install the Mermaid MCP Server

claude mcp add mermaid-1 --env PUPPETEER_EXECUTABLE_PATH=your-value -- npx -y tsc

Configuration

VariableDescriptionRequired
PUPPETEER_EXECUTABLE_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • “Use Mermaid to generate.”
  • “Use Mermaid to Parameters.”
  • “Use Mermaid to theme.”

Frequently asked questions

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.