mcp_mermaid_image_gen

mcp_mermaid_image_gen

3.2

If you are the rightful owner of mcp_mermaid_image_gen and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An MCP server that generates diagrams from Mermaid code in multiple formats (SVG, PNG, PDF).

The MCP Mermaid Image Gen server is a versatile tool that leverages the Mermaid CLI to provide diagram generation capabilities through the Model Context Protocol (MCP). It supports two operation modes: file-based, which saves diagrams to disk and returns the file path, and stream-based, which returns the diagram directly as base64-encoded data. This server is designed for use by AI coding assistants and other MCP clients, enabling them to create diagrams using the Mermaid diagram syntax without needing direct access to the Mermaid CLI. It supports multiple themes, formats, and customizable backgrounds, making it a flexible solution for generating flowcharts, sequence diagrams, class diagrams, and more.

Features

  • Generate diagrams from Mermaid syntax (flowcharts, sequence diagrams, class diagrams, etc.)
  • Multiple output formats: SVG, PNG, PDF
  • Support for multiple themes and customizable background colors
  • Two operation modes: file-based and stream-based
  • Comprehensive error handling and validation

Tools

  1. generate_mermaid_diagram_file

    Generates a Mermaid diagram and saves it to a local file.

  2. generate_mermaid_diagram_stream

    Generates a Mermaid diagram and returns it directly as base64-encoded data.