Mermaid Validator MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mermaid Validator MCPvalidate this mermaid diagram: graph TD; A-->B"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mermaid Validator MCP
A Model Context Protocol (MCP) server built with Bun and TypeScript that validates Mermaid diagram syntax.
Quick Start
This package is published on npm. You can run it directly with npx:
npx -y mermaid-validator-mcpRelated MCP server: Mermaid-Grammer-Inspector
MCP Client Configuration
Add the server to your MCP client (e.g. Claude Desktop) configuration:
Using npx (recommended)
{
"mcpServers": {
"mermaid-validator": {
"command": "npx",
"args": ["-y", "mermaid-validator-mcp"]
}
}
}Using local source
{
"mcpServers": {
"mermaid-validator": {
"command": "bun",
"args": [
"/path/to/mermaid-validator-mcp/index.ts"
]
}
}
}Or if you have it installed globally:
{
"mcpServers": {
"mermaid-validator": {
"command": "mermaid-validator-mcp"
}
}
}Features
Single tool –
validate_mermaid: Pass any Mermaid diagram text and receive either a success response with the detected diagram type, or a detailed parse-error message.Supports all major Mermaid diagram types: flowchart, sequence, class, pie, gantt, state, ER, gitGraph, mindmap, timeline, and more.
No dependency on
mermaid-clior any external rendering process.Uses JSDOM to provide the minimal DOM environment required by Mermaid.
Requirements
Bun ≥ 1.0
Getting Started
# Install dependencies
bun install
# Start the MCP server (stdio mode)
bun startTool: validate_mermaid
Input
Field | Type | Description |
| string | The Mermaid diagram text to validate |
Output (JSON text)
Valid diagram
{ "valid": true, "diagramType": "flowchart-v2" }Invalid diagram
{
"valid": false,
"error": "Parse error on line 2:\n...TD\n --> B\n-------^\nExpecting 'SEMI', ..."
}Development
# Run with auto-reload
bun dev
# Build
bun run buildThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that converts text inputs into visualized flowcharts, enabling AI clients to generate high-quality Mermaid diagrams directly from natural language descriptions or structured text.11MIT
- AlicenseAqualityFmaintenanceA Model Context Protocol (MCP) server for validating Mermaid diagram syntax and providing comprehensive grammar checking capabilities1135MIT
- Alicense-qualityCmaintenanceA lightweight MCP server that provides real-time Mermaid diagram syntax validation with support for all diagram types.983MIT
- AlicenseAqualityDmaintenanceAn MCP server that generates diagrams from Mermaid code in multiple formats (PNG, PDF, SVG).21MIT
Related MCP Connectors
Monitor MCP servers, API contracts and AI outputs for schema drift. Alerts on breaking changes.
Conformance checker for MCP servers. Free, no key, verdicts recomputable and re-measured daily.
MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LF112/mermaid-validator-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server