Back to Home
veelenga icon

claude-mermaid

Verified Safe

by veelenga

Overview

Provides an MCP server for rendering Mermaid diagrams in a coding environment with live reload and saving capabilities.

Installation

Run Command
claude-mermaid

Environment Variables

  • CLAUDE_MERMAID_LOG_LEVEL

Security Notes

The server implements strong input validation for preview IDs and save paths using regex and checks against system directories, mitigating path traversal and injection risks. HTML content rendered for previews is also escaped to prevent XSS. The use of `npx @mermaid-js/mermaid-cli` for rendering, while involving `child_process.execFile`, is done with carefully constructed arguments and temporary files in isolated directories, reducing command injection surfaces. Live server runs on localhost with a Content Security Policy (CSP) header further limiting potential attack vectors.

Similar Servers

Stats

Interest Score47
Security Score9
Cost ClassLow
Avg Tokens300
Stars24
Forks5
Last Update2025-12-08

Tags

MermaidLive ReloadDiagrammingDeveloper ToolMCP Server