What does the validateMermaid tool do?
It accepts a Mermaid diagram string, validates it, and returns a confirmation text plus a base64-encoded PNG image if valid, or an error message if invalid.
@rtuin
基本信息
A Model Context Protocol server that validates and renders Mermaid diagrams.
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mermaid-validator": {
"command": "npx",
"args": [
"-y",
"@rtuin/mcp-mermaid-validator"
]
}
}
}Validates a Mermaid diagram and returns the rendered image (PNG or SVG) if valid
Mermaid Validator is a Model Context Protocol server that validates and renders Mermaid diagrams. It enables LLMs to check diagram syntax and obtain a rendered PNG image, integrating with MCP-compatible clients.
Configure your MCP client by adding the server to the mcp servers file with the command npx -y @rtuin/mcp-mermaid-validator@latest. The server exposes a validateMermaid tool that accepts a Mermaid diagram string and returns validation results plus a rendered PNG if valid.
It accepts a Mermaid diagram string, validates it, and returns a confirmation text plus a base64-encoded PNG image if valid, or an error message if invalid.
The server depends on `@modelcontextprotocol/sdk`, `@mermaid-js/mermaid-cli`, and `zod` for schema validation.
It uses a nested try-catch structure to distinguish between validation errors (invalid diagram syntax) and system errors, providing detailed error information to help users fix their diagrams.
It uses PNG as the default output format because it ensures better compatibility with most MCP clients, particularly Cursor, which does not support SVG.
It communicates via standard input/output as an MCP server and can be run using `npx` with the package `@rtuin/mcp-mermaid-validator@latest`. For development, it can be launched via the MCP Inspector.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,

B2B competitive intelligence, live sales battlecards, 5-axis ICP prospect fit scoring, and tech stack teardowns over MCP and REST with cited public-web evidence.

Soar Flight Booking MCP is a remote MCP server available at https://mcp.soar.flights.

Model Context Protocol Servers
评论