MCP Catalogs
Home

mcp-mermaid-validator

by rtuin·54·Score 45

MCP server for validating and rendering Mermaid diagrams into PNG format.

developer-toolsproductivityai-llm
15
Forks
2
Open issues
3 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server provides a tool for validating Mermaid diagram syntax and rendering them as PNG images. It uses the Mermaid CLI tool to process diagram input through Node.js child processes, allowing it to capture both validation results and rendered outputs. The server returns text confirmation along with base64-encoded PNG data for valid diagrams, and detailed error messages for invalid ones.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:LLMs generating Mermaid diagrams can validate their syntax before rendering
you:Documentation systems that need to include verified diagram visuals
you:Developers working with diagram-heavy documentation requiring automated validation
you:What image formats are supported?
you:How are errors handled?

When to choose this

Choose this MCP server when your application needs to validate and render Mermaid diagrams as PNG images in an AI workflow.

When NOT to choose this

Don't choose this if you need SVG output format or require more advanced diagram manipulation features beyond validation and basic rendering.

Tools this server exposes

1 tool extracted from the README
  • validateMermaiddiagram: string

    Validates a Mermaid diagram and returns the rendered PNG if valid

Comparable tools

mermaid-clidiagrams-mcpgraphviz-mcp

Installation

Installation

Using npx:

npx -y @rtuin/mcp-mermaid-validator@latest

Add to your MCP configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "mermaid-validator": {
      "command": "npx",
      "args": [
        "-y",
        "@rtuin/mcp-mermaid-validator@latest"
      ]
    }
  }
}

FAQ

What image formats are supported?
The server currently outputs diagrams in PNG format for better compatibility with most MCP clients, particularly those that don't support SVG.
How are errors handled?
The server distinguishes between validation errors (invalid diagram syntax) and system errors, providing detailed error messages to help users fix their diagrams while maintaining service stability.

Compare mcp-mermaid-validator with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.