@devstefancho/mermaid-mcp
An MCP server that helps create and analyze Mermaid flowcharts for use with Claude.
Overview
This MCP server provides two tools:
analyze-flowchart: Analyzes a flowchart description for completeness and provides a previewgenerate-flowchart: Converts a text description into a Mermaid flowchart
Installation
Using npx (Recommended)
The easiest way to use this tool is with npx, which comes with npm:
npx @devstefancho/mermaid-mcp
This will download and run the latest version of the Mermaid MCP server.
Global Installation
You can also install the package globally:
npm install -g @devstefancho/mermaid-mcp
Then you can run it from anywhere:
mermaid-mcp
Local Installation
For local development or integration:
# Install in your project
npm install @devstefancho/mermaid-mcp
# Run from your project
npx @devstefancho/mermaid-mcp
Usage
In Claude for Desktop
-
Open your Claude for Desktop configuration file:
# macOS code ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows code %APPDATA%\Claude\claude_desktop_config.json -
Add this server to your configuration:
{ "mcpServers": { "mermaid-mcp": { "command": "npx", "args": ["-y", "@devstefancho/mermaid-mcp"] } } } -
Restart Claude for Desktop
Tools
Analyze Flowchart
Analyze your flowchart description for completeness and get a preview.
Usage example:
[Flowchart] First I check if the user is logged in. If yes, I show the dashboard. Otherwise, I redirect to the login page.
Generate Flowchart
Create a Mermaid flowchart from your text description.
Usage example:
[Flowchart] Start with user input. Then validate the input. If validation passes, process the data and show success message. Otherwise, show error message and return to user input.
Development
Running Locally
To run the server in development mode:
npm run dev
Building the Project
npm run build
Publishing to npm
To publish a new version to npm:
- Update the version in
package.json - Run the publish script:
npm run publish
License
MIT
