SuperAPI AI Directory

mcp-mermaid

mcp-mermaid is an MCP (Model Context Protocol)-based server used to let AI dynamically generate Mermaid diagrams. It fully supports all of Mermaid's syntax and features, can configure background color and theme, and supports export to base64, svg, mermaid, file, as well as remotely usable svg_url, png_url, and other formats. It also provides Mermaid syntax validation, making it easier for models to output correct graphics over multiple rounds. This tool can be integrated into desktop applications such as Claude, VSCode, Cline, Cherry Studio, and also supports use through HTTP, SSE, and Streamable protocols on platforms such as Alibaba Cloud, ModelScope, glama.ai, and smithery.ai, and provides a Docker image.

Open website

About this tool

mcp-mermaid is an MCP (Model Context Protocol)-based server used to let AI dynamically generate Mermaid diagrams and graphics. The project is maintained by hustcc, and the repository address is https://github.com/hustcc/mcp-mermaid。

Purpose The core purpose of this tool is to enable AI models to dynamically generate Mermaid diagrams. It fully supports all of Mermaid's features and syntax, and is suitable for scenarios that require AI to automatically produce Mermaid graphics such as flowcharts and sequence diagrams. In addition, the project also mentions that mcp-server-chart can be used to generate charts, graphs, and maps, Infographic can be used to generate infographics (such as Timeline, Comparison, List, Process, etc.), and figure.ling.pub/gallery can be used to browse and share AI charts and graphics generated by mcp-mermaid and other tools.

Main capabilities

  • Full support for all of Mermaid's features and syntax.
  • Support for configuring backgroundColor and theme, enabling large language models to output rich style configurations.
  • Support for export to base64, svg, mermaid, file, as well as svg_url and png_url formats that are convenient for remote use.
  • Provides Mermaid validation, making it easier for models to output correct syntax and graphics over multiple rounds.
  • Using outputType: "file" can automatically save PNG diagrams to disk for use by AI agents; using URL mode allows sharing diagrams through public mermaid.ink links.

Usage When used in desktop applications (such as Claude, VSCode, Cline, Cherry Studio, etc.), the MCP server configuration below needs to be added. The materials provide configuration instructions for the Mac system and the Windows system respectively, but the specific configuration content is not fully shown in the provided text.

It can also be used on aliyun, modelscope, glama.ai, smithery.ai, or other platforms through HTTP and SSE protocols:

  • SSE: http://localhost:3033/sse
  • Streamable: http://localhost:1122/mcp

Docker image tags:

  • susuperli/mcp-mermaid:latest - latest stable version
  • You can view all available tags on Docker Hub

Run using SSE or Streamable transport: Option 1: Global installation Install the package globally, then run the server using your preferred transport option. Option 2: Local development When using the source code locally, you can access the server address:

  • SSE transport: http://localhost:3033/sse
  • Streamable transport: http://localhost:1122/mcp(本地)或 http://localhost:3033/mcp(全局)

The following CLI options are also available when running the MCP server. Run the CLI with -h to view the command options.

Other commands include: installing dependencies, building the server, starting the MCP server, using MCP Inspector (for debugging), using different transport protocols, using the node command directly, and running MCP Mermaid with Docker. The titles of these commands are listed in the materials, but the specific command contents are not fully shown in the provided text.

Use cases Suitable for development and debugging scenarios that require AI to dynamically generate Mermaid diagrams. It can be integrated into desktop applications that support MCP or cloud platforms accessed via HTTP, SSE, and Streamable protocols. It is also suitable for AI agent workflows that need to export diagrams as files or share them via links.

Limitations The materials do not provide complete information about fees, pricing, platform compatibility details, performance results, or specific usage steps. Some configuration and command contents are missing and are not currently provided.