1. Conduid
  2. Developer Tools
  3. diagram-master
MCP server · Developer Tools

diagram-master

MCP server that generates Draw.io diagrams from natural language — supports flowcharts, sequence diagrams, ERDs, and network diagrams

39Low

Scored 2 months ago · breakdown

About diagram-master

diagram-master is an MCP server published by git+thechandanbhagat in the Developer Tools category: mCP server that generates Draw.io diagrams from natural language — supports flowcharts, sequence diagrams, ERDs, and network diagrams.

Install

Install
npx diagram-master
Claude Code
claude mcp add diagram-master -- npx -y diagram-master
npx
npx -y diagram-master

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about diagram-master

Powered by Claude · Grounded in docs

I know everything about diagram-master. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

4 checks have not been run yet.

README

MCP Draw.io Diagram Server

A Model Context Protocol (MCP) server that generates Draw.io compatible diagrams from natural language prompts. This server enables AI assistants to create professional diagrams in XML format that can be opened directly in Draw.io.

Features

  • Unified Interface: Single tool (create_diagram) for all diagram types
  • Flowchart Generation: Create sequential flowcharts with automatic hierarchical layout and branching support
  • Sequence Diagrams: Generate professional UML sequence diagrams with lifelines and activation bars
  • Entity Relationship Diagrams (ERD): Create database schemas with entities and relationships
  • Network Diagrams: Build network and architecture diagrams with custom node positioning
  • Custom Diagrams: Full control over shapes, positions, and connections for any diagram type
  • Draw.io Compatible: Outputs valid Draw.io XML format that can be imported directly

Star History

Star History Chart

Installation

  1. Clone or download this repository
  2. Install dependencies:
npm install

Configuration

Environment Variables

  • DRAWIO_OUTPUT_DIR: (Optional) Specifies the directory where diagram files will be saved. If not set, files are saved to the current working directory.

Example:

export DRAWIO_OUTPUT_DIR=/path/to/diagrams  # Linux/macOS
set DRAWIO_OUTPUT_DIR=C:\diagrams          # Windows

Usage with Claude Desktop

Add this server to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Basic Configuration

{
  "mcpServers": {
    "diagram-master": {
      "command": "node",
      "args": ["D:\\TopSecret\\diagram-master\\index.js"]
    }
  }
}

With Custom Output Directory

{
  "mcpServers": {
    "diagram-master": {
      "command": "node",
      "args": ["D:\\TopSecret\\diagram-master\\index.js"],
      "env": {
        "DRAWIO_OUTPUT_DIR": "C:\\Users\\YourName\\Documents\\Diagrams"
      }
    }
  }
}

Make sure to update the paths to match your actual installation directory and desired output location.

Available Tools

create_diagram

Creates a diagram of the specified type and saves it to a file.

Parameters:

  • filename: Name for the output .drawio file (extension added automatically)
  • type: Type of diagram to generate (flowchart, sequence, network, erd, custom)
  • data: Object containing diagram-specific data

1. Flowchart

Data Structure:

  • steps: Array of steps (id, label, type)
  • connections: Array of connections (from, to, label)

Example:

{
  "type": "flowchart",
  "filename": "login-flow",
  "data": {
    "steps": [
      { "id": "start", "label": "Start", "type": "terminator" },
      { "id": "input", "label": "Input Credentials", "type": "data" },
      { "id": "check", "label": "Valid?", "type": "decision" },
      { "id": "end", "label": "End", "type": "terminator" }
    ],
    "connections": [
      { "from": "start", "to": "input" },
      { "from": "input", "to": "check" },
      { "from": "check", "to": "end", "label": "Yes" },
      { "from": "check", "to": "input", "label": "No" }
    ]
  }
}

2. Sequence Diagram

Data Structure:

  • participants: Array of participant names
  • interactions: Array of interactions (from, to, message, dashed)

Example:

{
  "type": "sequence",
  "filename": "api-call",
  "data": {
    "participants": ["Client", "Server", "DB"],
    "interactions": [
      { "from": "Client", "to": "Server", "message": "Request" },
      { "from": "Server", "to": "DB", "message": "Query" },
      { "from": "DB", "to": "Server", "message": "Result", "dashed": true },
      { "from": "Server", "to": "Client", "message": "Response", "dashed": true }
    ]
  }
}

3. Entity Relationship Diagram (ERD)

Data Structure:

  • entities: Array of entities (id, name, attributes)
  • relationships: Array of relationships (from, to, label)

Example:

{
  "type": "erd",
  "filename": "schema",
  "data": {
    "entities": [
      { "id": "users", "name": "Users", "attributes": ["id", "email", "password"] },
      { "id": "posts", "name": "Posts", "attributes": ["id", "user_id", "title"] }
    ],
    "relationships": [
      { "from": "users", "to": "posts", "label": "1:N" }
    ]
  }
}

4. Network Diagram

Data Structure:

  • nodes: Array of nodes (id, label, type, x, y)
  • connections: Array of connections (from, to, label)

5. Custom Diagram

Data Structure:

  • shapes: Array of shapes (id, label, type, x, y, width, height)
  • connectors: Array of connectors (from, to, label)

Output Format

The server automatically saves diagrams as .drawio files in the configured output directory. Open these files directly in Draw.io.

Development

Project Structure

diagram-master/
├── index.js              # MCP server implementation
├── drawio-generator.js   # Draw.io XML generation utilities
├── package.json          # Project dependencies
├── README.md            # This file
├── CHANGELOG.md         # Version history
└── LICENSE              # MIT License

License

MIT

Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

Roadmap

Future enhancements:

  • Class diagrams and State machines
  • Style customization (colors, fonts, line styles)
  • Export to multiple formats (PNG, SVG, PDF)

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About diagram-master

How do I install diagram-master?

Run npx diagram-master, then add the server to your MCP client's configuration.

Is diagram-master safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 2 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is diagram-master still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.