loading…
Search for a command to run...
loading…
An MCP server that validates Mermaid diagram syntax and identifies diagram types across all major formats. It provides detailed parse-error messages for invalid
An MCP server that validates Mermaid diagram syntax and identifies diagram types across all major formats. It provides detailed parse-error messages for invalid diagrams without requiring external rendering processes.
A Model Context Protocol (MCP) server built with Bun and TypeScript that validates Mermaid diagram syntax.
This package is published on npm. You can run it directly with npx:
npx -y mermaid-validator-mcp
Add the server to your MCP client (e.g. Claude Desktop) configuration:
{
"mcpServers": {
"mermaid-validator": {
"command": "npx",
"args": ["-y", "mermaid-validator-mcp"]
}
}
}
{
"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"
}
}
}
validate_mermaid: Pass any Mermaid diagram text and receive either a success response with the detected diagram type, or a detailed parse-error message.mermaid-cli or any external rendering process.# Install dependencies
bun install
# Start the MCP server (stdio mode)
bun start
validate_mermaid| Field | Type | Description |
|---|---|---|
diagram |
string | The Mermaid diagram text to validate |
Valid diagram
{ "valid": true, "diagramType": "flowchart-v2" }
Invalid diagram
{
"valid": false,
"error": "Parse error on line 2:\n...TD\n --> B\n-------^\nExpecting 'SEMI', ..."
}
# Run with auto-reload
bun dev
# Build
bun run build
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mermaid-validator-mcp": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.