- Home
- MCP servers
- Mermaid Lint
Mermaid Lint
- javascript
1
GitHub Stars
javascript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"yaodebian-mermaid-lint-mcp": {
"command": "npx",
"args": [
"mermaid-lint-mcp",
"server"
],
"env": {
"DEBUG": "mermaid-lint-mcp",
"MERMAID_TIMEOUT": "YOUR_VALUE"
}
}
}
}Mermaid Lint MCP provides both a command-line interface and a native MCP server to validate Mermaid diagrams quickly. It helps developers, technical writers, and AI tools ensure diagrams are correct before rendering or publishing, and it supports fast feedback during authoring and automated workflows.
How to use
You can validate Mermaid diagrams locally using the CLI, or run a dedicated MCP server to validate diagrams in real time as you work with AI assistants.
To validate a diagram from a file using the CLI, run: npx mermaid-lint-mcp lint diagram.mmd.
To validate Mermaid code directly, use: npx mermaid-lint-mcp lint --code "graph TD; A-->B".
To start the MCP server for integration with AI assistants, run: npx mermaid-lint-mcp server.
If you need help, you can display available commands and options: npx mermaid-lint-mcp --help.
How to install
Prerequisites: Node.js and npm must be available on your system.
Option 1. Use with npx (recommended). No installation is required; you run it directly: npx mermaid-lint-mcp.
Option 2. Global installation. Install once and run the command globally: npm install -g mermaid-lint-mcp and then use mermaid-lint-mcp.
Option 3. Local project installation. Install in your project and run with npx: npm install mermaid-lint-mcp and then npx mermaid-lint-mcp.
Configuration and environment
You can configure timeouts and enable debug logging through environment variables.
export MERMAID_TIMEOUT=10000
export DEBUG=mermaid-lint-mcp
Usage patterns and tips
Use the CLI for quick validation during development or in CI/CD pipelines. Run the MCP server when you want real-time validation as you interact with AI assistants or automated workflows.
Available tools
lint
Validates Mermaid diagrams from files or code strings, returning validity status and error details with diagram type.
server
Starts an MCP server to validate Mermaid diagrams in real-time for AI assistants and integrated workflows.