/ 디렉터리 / 플레이그라운드 / mcp-mermaid
● 커뮤니티 hustcc ⚡ 바로 사용

mcp-mermaid

제작: hustcc · hustcc/mcp-mermaid

Generate validated Mermaid diagrams and charts — SVG, PNG, or hosted URL — right from chat. No separate renderer needed.

mcp-mermaid generates Mermaid diagrams dynamically and returns them as base64, SVG text, saved file, or hosted URL. Includes syntax validation and multi-round correction so malformed Mermaid gets fixed automatically. Also supports infographics (timeline, comparison, process).

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

mermaid.replay ▶ 준비됨
0/0

설치

클라이언트 선택

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mermaid": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mermaid"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config 열기. 저장 후 앱 재시작.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mermaid": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mermaid"
      ],
      "_inferred": true
    }
  }
}

Cursor는 Claude Desktop과 동일한 mcpServers 스키마 사용. 프로젝트 설정이 전역보다 우선.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mermaid": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mermaid"
      ],
      "_inferred": true
    }
  }
}

Cline 사이드바의 MCP Servers 아이콘 클릭 후 "Edit Configuration" 선택.

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mermaid": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mermaid"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop과 같은 형식. Windsurf 재시작 후 적용.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mermaid",
      "command": "npx",
      "args": [
        "-y",
        "mcp-mermaid"
      ]
    }
  ]
}

Continue는 맵이 아닌 서버 오브젝트 배열 사용.

~/.config/zed/settings.json
{
  "context_servers": {
    "mermaid": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-mermaid"
        ]
      }
    }
  }
}

context_servers에 추가. 저장 시 Zed가 핫 리로드.

claude mcp add mermaid -- npx -y mcp-mermaid

한 줄 명령. claude mcp list로 확인, claude mcp remove로 제거.

사용 사례

실전 활용법: mcp-mermaid

Generate a system architecture diagram from prose

👤 Engineers writing design docs ⏱ ~10 min beginner

언제 쓸까: You've described an architecture in a doc and want a diagram without leaving chat.

사전 조건
  • mcp-mermaid installed — npx -y mcp-mermaid in your MCP client config
흐름
  1. Describe the system
    Here's my architecture: Cloudflare → API (Node) → Postgres + Redis → Worker (Go). Generate a Mermaid flowchart showing this.✓ 복사됨
    → Valid Mermaid source rendered as SVG
  2. Iterate on styling
    Make Cloudflare blue, Postgres green, Redis red. Use dashed edges for async.✓ 복사됨
    → Revised diagram
  3. Save to file
    Output as PNG file at ./docs/arch.png with white background.✓ 복사됨
    → File on disk

결과: An architecture PNG you can drop into the design doc.

함정
  • Very complex diagrams hit Mermaid's layout limits — Break into multiple diagrams, or switch to subgraph grouping
  • Theme colors don't match your doc — Pass theme config explicitly rather than relying on defaults
함께 쓰기: filesystem

Draft a sequence diagram in a bug report

👤 Engineers filing tricky race-condition bugs ⏱ ~5 min beginner

언제 쓸까: Prose description of who calls whom when is hard to read.

흐름
  1. Describe the sequence
    Client sends POST, API starts transaction, writes to DB, crashes before commit. Meanwhile a retry comes in from the client. Draw a sequence diagram.✓ 복사됨
    → Clear sequence with parallel lifelines
  2. Inline into issue
    Give me the Mermaid source so I can paste into a GitHub issue (which renders Mermaid natively).✓ 복사됨
    → Source ready to paste

결과: A bug report reviewers can grok in 10 seconds.

함께 쓰기: github

Generate a project Gantt from a timeline

👤 Project leads who don't want to pay for gantt software for a one-off ⏱ ~5 min beginner

언제 쓸까: Ad-hoc timeline for a PRD or kickoff.

흐름
  1. List phases
    Phases: Discovery (2 weeks), Design (3 weeks), Implementation (6 weeks), QA (2 weeks overlap with impl last 2 weeks). Starting 2026-05-01. Make a gantt.✓ 복사됨
    → Valid Gantt source
  2. Output PNG
    Save as PNG and also give me the URL I can embed in the PRD.✓ 복사됨
    → PNG path + hosted URL

결과: A timeline graphic for your PRD in under a minute.

조합

다른 MCP와 조합해 10배 효율

mermaid + filesystem

Save generated diagrams as versioned assets

Generate architecture diagram v2 as ./docs/arch-v2.png and update the reference in ./docs/README.md.✓ 복사됨
mermaid + github

Put Mermaid source in a PR description — GitHub renders it natively

Draft a PR description explaining the data flow change, include a Mermaid sequence diagram inline.✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
generate_mermaid source: str (Mermaid DSL), output: base64|svg|mermaid|file|svgUrl|pngUrl, theme?, backgroundColor? Any diagram generation free (local render) or 1 API call for hosted URLs
validate_mermaid source: str Before generate if you're unsure about syntax free

비용 및 제한

운영 비용

API 쿼터
Local rendering is free; hosted URL output uses mermaid.ink which is free with reasonable use
호출당 토큰
Small — diagram DSL is compact
금액
Free
Prefer 'mermaid' output for GitHub/docs that render natively; only go to PNG/SVG when rendering server-side is needed.

보안

권한, 시크릿, 파급범위

자격 증명 저장: None
데이터 외부 송신: Local render for base64/svg; mermaid.ink for hosted URLs

문제 해결

자주 발생하는 오류와 해결

Mermaid parse error

The LLM emitted invalid DSL. Validate via validate_mermaid first; mcp-mermaid also self-corrects on second pass.

확인: validate_mermaid on the source
PNG output fails in Docker

The image needs a headless browser; use the official Docker image which bundles it.

확인: docker run hustcc/mcp-mermaid
Diagram too big, gets cut off

Break into subgraphs or split into multiple diagrams.

대안

mcp-mermaid 다른 것과 비교

대안언제 쓰나단점/장점
PlantUML MCPYou prefer PlantUML's deeper UML surfaceRequires Java runtime
antv-chart / mcp-server-chartYou need data charts more than diagramsDifferent shape of output
Raw Mermaid via the web editorYou're not in a chat workflowNo MCP integration

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기