general MCP Server
A Model Context Protocol (MCP) server for validating Mermaid diagram syntax and providing comprehensive grammar checking capabilities
Discovered via github-topic:mcp and last synced 4mo ago.
1. Install the package
npx @betterhyq/mermaid-grammer-inspector-mcp
2. Add to claude_desktop_config.json
{
"mcpServers": {
"-betterhyq-mermaid-grammer-inspector-mcp": {
"command": "npx",
"args": [
"@betterhyq/mermaid-grammer-inspector-mcp"
]
}
}
}Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)
Documentation engineers and technical writers who create Mermaid diagrams for architecture, flowcharts, and system design benefit most from this MCP server. Developers integrating diagram validation into CI/CD pipelines gain automated quality checks to catch syntax errors before publishing. Teams maintaining large diagram libraries use this to ensure consistency and prevent broken visualizations in production documentation.
Automatically check Mermaid diagram syntax as part of your build process to catch errors before they reach documentation or production. Prevents broken diagrams from being deployed alongside code changes.
Use Claude with this MCP to review pull requests containing Mermaid code, identifying grammar issues and syntax violations in real-time. Provides detailed feedback for improving diagram quality before merge.
Ask Claude to validate your Mermaid syntax and generate corrected versions with explanations of what was wrong. Useful for learning proper diagram syntax and fixing complex multi-element diagrams.
Check entire collections of Mermaid files across your documentation to identify patterns of incorrect syntax or inconsistent diagram structures. Helps maintain standards across large documentation sets.
The server validates Mermaid syntax for all standard diagram types including flowcharts, sequence diagrams, class diagrams, state diagrams, entity-relationship diagrams, and more. Refer to the Mermaid documentation for the complete list of supported diagram types and their specific syntax rules.
The MCP validates syntax and identifies errors. When used with Claude, it can suggest corrections and generate corrected code, but you review and approve changes before applying them. This ensures your diagram intent remains intact while fixing syntax issues.
Add this MCP server to your Claude configuration, then use Claude to validate Mermaid files in your codebase or documentation. It works seamlessly in CI/CD scripts, pre-commit hooks, or as part of documentation review workflows with Claude.
No, it complements Mermaid's native validation with deeper grammar analysis and context-aware checking through Claude. Use both together: Mermaid's compiler catches obvious syntax errors, while this MCP provides more comprehensive review and suggestions.