mermaid-mcp-server

mermaid-mcp-server

5

The Mermaid MCP Server is a Model Context Protocol server designed to interact with Mermaid diagrams by validating their syntax, rendering them to SVG format, and providing documentation links. It facilitates easy integration with AI assistants and is recommended for use with the Roo Cline VSCode Extension.

Mermaid MCP Server

A Model Context Protocol (MCP) server providing tools for validating and rendering Mermaid diagrams.

Features

  • Validate Mermaid Syntax: Check if the provided Mermaid code is syntactically correct.
  • Render to SVG: Convert valid Mermaid code into SVG image format.
  • Get Documentation Link: Provide a link to the official Mermaid documentation.

Prerequisites

  • Node.js (v18 or later recommended)
  • npm or yarn
  • A compatible MCP client (e.g., Roo Cline VSCode Extension)

Installation

Using with Roo Cline (Recommended):

  1. Install the package globally.
  2. Configure Roo Cline in its settings file.
  3. Restart VSCode or reload the window.

Available Tools

  • validate_mermaid: Validate Mermaid syntax.
  • render_mermaid_svg: Render Mermaid code to SVG.
  • get_mermaid_docs_link: Get Mermaid documentation link.

Development

  1. Clone the repository.
  2. Install dependencies.
  3. Build the server.
  4. Test with the MCP Inspector.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License