Skip to main content
Glama

diag2md-mcp

Model Context Protocol (MCP) 서버로, AI 코딩 에이전트에게 Draw.io C4 및 UML 아키텍처 가드레일과 다이어그램 변환 기능을 제공합니다.

GitHub Release License: MIT TypeScript

diag2md-mcp는 Draw.io 아키텍처 다이어그램(.xml, .drawio)과 AI 코딩 에이전트(예: Antigravity, Cursor, Claude Desktop, VS Code MCP 클라이언트)를 연결하여 C4 및 UML 다이어그램을 실시간으로 구조화된 Mermaid Markdown으로 변환합니다.

diag2md 기반.


주요 기능

  • 자동 워크스페이스 검색: 구성 가능한 glob 패턴(**/architecture/**/*.xxml, **/*.drawio)과 일치하는 Draw.io 다이어그램 파일을 프로젝트 디렉터리에서 검색합니다.

  • 고성능 인메모리 변환: 하위 ell 프로세스 생성 오버헤드 없이 Draw.io XML 모델을 메모리 내에서 Mermaid C4 및 UML Markdown으로 변환합니다.

  • AI 컨텍스트 제공자(convert_diagrams_read): 다이어그램을 동적으로 읽고 변환하여 채팅 세션 중 AI 코딩 어시스턴트에게 풍부한 아키텍처 컨텍스트를 직접 제공합니다.

  • 일괄 다이어그램 동기화(convert_diagrams_write): 다이어그램 소스 옆에 .md 파일을 생성하여 아키텍처 문서를 최신 상태로 유지합니다.


Related MCP server: drawio-mcp

빠른 시작

npx로 실행하기

MCP 서버를 사전 설치 없이 직접 실행할 수 있습니다:

npx -y diag2md-mcp

전역 설치

npm install -g diag2md-mcp

MCP 서버 구성

diag2md-mcp를 선호하는 AI 어시스턴트 또는 MCP 클라이언트에 연결하려면 클라이언트 구성 파일(예: mcp_config.json, claude_desktop_config.json, Cursor 또는 Antigravity MCP 설정)에 서버를 추가하세요.

권장(전역 설치 패키지)

{
  "mcpServers": {
    "diag2md-mcp": {
      "command": "diag2md-mcp"
    }
  }
}

대안: 로컬 빌드 소스

{
  "mcpServers": {
    "diag2md-mcp": {
      "command": "node",
      "args": ["/path/to/diag2md-mcp/dist/index.js"]
    }
  }
}

대안: npx를 통한 온디맨드

{
  "mcpServers": {
    "diag2md-mcp": {
      "command": "npx",
      "args": ["-y", "diag2md-mcp"]
    }
  }
}

MCP 도구 참조

diag2md-mcp는 AI 코딩 에이전트에 3가지 핵심 도구를 제공합니다:

도구 이름

설명

인자

list_diagrams

워크스페이스에서 glob 패턴과 일치하는 모든 Draw.io 아키텍처 다이어그램 파일(.xxml, .drawio)을 검색합니다.

patterns (선택적 string[]), ignore (선택적 string[])

convert_diagrams_write

glob 패턴과 일치하는 워크스페이스 다이어그램 파일을 일괄 검색하여 변환하고, 업데이트된 .md 파일을 디스크에 작저합니다.

patterns (선택적 string[]), diagramType (선택적 "c4" | "uml")

convert_diagrams_read

워크스페이스 다이어그램 파일을 일괄 검색하고 변환된 Mermaid Markdown을 AI 어시스턴트의 컨텍스트로 직접 반환합니다.

patterns (선택적 string[]), diagramType (선택적 "c4" | "uml")


서버 구성

MCP 서버 설정은 환경 변수를 통해 사용자 지정할 수 있습니다:

환경 변수

설명

기본값

DIAG2MD_PATTERNS

다이어그램 파일을 검색하기 위한 쉼표로 구분된 glob 패턴.

**/architecture/**/*.xml, **/architecture/*.xml, **/*.drawio

DIAG2MD_IGNORE

파일 검색 중 무시할 쉼표로 구분된 glob 패턴.

**/node_modules/**, **/dist/**, **/.git/**

DIAG2MD_TYPE

기본 변환 다이어그램 유형(c4 또는 uml).

c4

env 패턴을 사용한 구성 예시

env 블록을 사용하여 MCP 서버 JSON 구성에서 직접 사용자 지정 검색 패턴을 구성할 수 있습니다:

{
  "mcpServers": {
    "diag2md-mcp": {
      "command": "diag2md-mcp",
      "env": {
        "DIAG2MD_PATTERNS": "**/architecture/**/*.xml, **/docs/**/*.drawio",
        "DIAG2MD_IGNORE": "**/tmp/**, **/node_modules/**",
        "DIAG2MD_TYPE": "c4"
      }
    }
  }
}

patterns를 사용한 동적 도구 호출 예시

AI 어시스턴트나 도구는 요청별로 검색 패턴을 동적으로 재정의할 수도 있습니다:

{
  "name": "convert_diagrams_read",
  "arguments": {
    "patterns": [
      "**/architecture/**/*.xml",
      "**/docs/**/*.drawio"
    ]
  }
}

개발

# Clone the repository
git clone https://github.com/diag2md/diag2md-mcp.git
cd diag2md-mcp

# Install dependencies
npm install

# Build TypeScript to JavaScript dist/
npm run build

# Run unit tests
npm run test

# Run type checker
npm run typecheck

라이선스

MIT © polymatic.ventures

Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Enables AI agents to programmatically create, modify, and analyze Draw.io diagrams through the Model Context Protocol. Supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between AI systems and Draw.io.
    13
    74
    1,443
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to generate professional UML diagrams (class, use case, activity, sequence) from natural language descriptions, producing editable .drawio files compatible with diagrams.net.
    7
    74
    ISC

View all related MCP servers

Related MCP Connectors

  • Let Claude, Cursor, or ChatGPT author Mermaid diagrams your team can read and share.

  • Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagr…

  • AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/diag2md/diag2md-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server