Mermaid2Visio is a modern, cross-platform utility that converts MermaidJS diagrams into native, editable Microsoft Visio (.vsdx) files.
Unlike legacy tools that rely on a local installation of Visio (COM automation), this project is built on Node.js and generates the VSDX XML structure directly. This means it runs on Windows, macOS, and Linux, and produces high-fidelity files without requiring Visio to be installed on the machine performing the conversion.
- No Visio License Required: Built on a modern Node.js architecture that generates native
.vsdxXML directly. This means you don't need to buy or install Microsoft Visio to perform conversions. - Cross-Platform: Runs seamlessly on Windows, macOS, and Linux.
- AI-Native Integration: Includes a built-in Model Context Protocol (MCP) server. Connect it to AI agents (like Claude Desktop) to give them the "skill" to generate professional diagrams for you.
- Smart Glue & Dynamic Routing: Features an advanced routing engine that creates "Smart Glue" connectors. When you open the file in Visio and move a shape, the lines follow and reroute automatically.
- Web-Based Visual Editor: Comes with a local web GUI for instant previewing and one-click downloads.
- Node.js (v18 or later)
git clone https://github.com/tropikandy/mermaid2visio.git
cd mermaid2visio
npm install
npm run buildVisual editor with live preview.
node dist/gui.jsOpens http://localhost:3000 in your browser. Paste Mermaid code, verify the preview, and download the .vsdx.
Convert files in bulk or via scripts.
node dist/index.js input.mmd [output.vsdx]Add this tool to your AI assistant (e.g., Claude Desktop) to give it "Visio Skills".
Configuration (claude_desktop_config.json):
{
"mcpServers": {
"mermaid2visio": {
"command": "node",
"args": [
"/absolute/path/to/mermaid2visio/dist/server.js"
]
}
}
}Prompt: "Generate a system architecture diagram for a cloud app and save it as a Visio file."
Right-click any .mmd or .md file to convert.
- Run
install_context_menu.batas Administrator. - Right-click a file -> Convert to Visio.
- Flowcharts (
graph TD,LR, etc.) - Subgraphs (mapped to Containers)
- Shapes:
- Rectangle
[] - Rounded
() - Cylinder
[()](Database) - Rhombus
{}(Decision) - Stadium
([]) - Subroutine
[[]] - Circle
(())
- Rectangle
- Styling:
fill,stroke,stroke-width,stroke-dasharray,color - Interactivity: Hyperlinks (
clickdirective)
ISC