mermaid-mender
Provides tools for validating and repairing Mermaid diagrams, including detection of missing diagram types, nonstandard arrows, unbalanced quotes/brackets, and automatic repair of these issues.
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-menderValidate this Mermaid diagram and fix it if needed: 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-mender
A tiny CLI and MCP-like server that validates and self-heals broken Mermaid diagrams generated by AI agents.
π― Why?
AI coding agents increasingly emit Mermaid diagrams into docs, README files, and agent workflows, but they often produce invalid arrows, missing diagram types, or unbalanced labels. Existing Mermaid renderers fail late and give little actionable repair feedback, and newer layout tools like Line9 are not open-source agent utilities. A small local validator/repair layer fits directly into agent loops, CI, and MCP toolchains.
Target audience: Developers using AI coding agents, MCP clients, documentation pipelines, and CI checks that need reliable Mermaid diagrams without manually debugging syntax.
Related MCP server: Fast Mermaid Validator MCP
β¨ Features
β¨ validate_mermaid: reports empty input, missing diagram type, nonstandard arrows, unbalanced quotes, and unbalanced brackets
β¨ repair_mermaid: normalizes arrows, closes odd quotes, and prepends flowchart TD when a flowchart is detected but missing
β¨ MCP-like stdio JSON-RPC server exposing validate and repair tools to agents
π Quick Start
# Install
pip install mermaid-mender
# Run
mermaid-mender --helpπ¦ Installation
From Source
git clone https://github.com/YOUR_USERNAME/mermaid-mender.git
cd mermaid-mender# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest -v㪠Demo
The GIF above was recorded using Charm VHS:
vhs < demo.tapeπ Usage
# Show help
mermaid-mender --help
# Common usage examples
mermaid-mender --exampleποΈ Architecture
graph LR
A[Input] --> B[Core Engine]
B --> C[Output]
B --> D[Plugins]
D --> E[Extensions]π€ Contributing
Contributions are welcome! Please:
Fork the repo
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
π License
MIT Β© 2026 β See LICENSE for details.
If this project helped you, please β star it!
This 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
- AlicenseBqualityCmaintenanceA Model Context Protocol server that validates and renders Mermaid diagrams.174456MIT
- Alicense-qualityAmaintenanceValidates Mermaid diagrams with comprehensive grammar parsing supporting 28+ diagram types. Processes markdown files, ZIP archives, and direct input with detailed error reporting and enterprise-grade performance capabilities.692Apache 2.0
- AlicenseAqualityFmaintenanceA Model Context Protocol (MCP) server for validating Mermaid diagram syntax and providing comprehensive grammar checking capabilities1135MIT
- AlicenseBqualityDmaintenanceA tool for validating Mermaid diagram syntax through CLI and MCP interfaces, providing real-time error checking and line-specific feedback. It enables AI assistants to self-validate and debug generated diagrams across all Mermaid types, ensuring valid visual documentation.192MIT
Related MCP Connectors
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagrβ¦
Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.
Let Claude, Cursor, or ChatGPT author Mermaid diagrams your team can read and share.
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/yulinlina/mermaid-mender'
If you have feedback or need assistance with the MCP directory API, please join our Discord server