mcpField
D
drawx-mcp-server

drawx-mcp-server

Local
github.com/SaharshPamechaMedia & Design0Updated 17w ago

About drawx-mcp-server

drawx-mcp-server connects AI assistants in Claude, Cursor, and VS Code to DrawX for creating draw.io diagrams and architecture designs. It supports one-shot diagram generation, architecture design outputs, and API quota checks.

Key features

  1. 01Generate diagrams from natural language
  2. 02Modify existing draw.io XML
  3. 03Create HLD and optional LLD designs
  4. 04Choose cloud-agnostic or cloud-specific styles
  5. 05Check API plan and remaining quota

Use cases

  1. 01Draft a diagram from a text description
  2. 02Revise an existing draw.io diagram
  3. 03Create architecture designs from a brief
  4. 04Check API quota before further work

MCP support

Exposes generate_diagram, architect_design, and whoami tools to MCP clients. It calls the DrawX public API and requires a DrawX API key.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"saharshpamecha-drawx": {
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
],
"env": {
"DRAWX_API_KEY": "<DRAWX_API_KEY>",
"DRAWX_API_BASE": "<DRAWX_API_BASE>"
}
}
}
}
Run commandnpx -y @drawx/mcp-server
Environment variables to set
DRAWX_API_KEYSecretYour DrawX API key (create one at https://getdrawx.com → Settings → API keys; starts with drawx_live_).
DRAWX_API_BASEOverride the DrawX API base URL (defaults to https://getdrawx.com/api/v1).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@drawx/mcp-server0.1.1

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
modeenumNoQuality/speed tier. Default flash.flash | pro | ultra
promptstringYesWhat to draw, in plain language.
previousXmlstringNoExisting mxfile XML to modify (full updated document is returned).

Details

From the project README

@drawx/mcp-server

npm version CI license: MIT

Generate draw.io diagrams and architecture designs from inside Claude, Cursor, or VS Code.

DrawX MCP is a Model Context Protocol server that gives your AI assistant three tools:

  • generate_diagram — one-shot: natural-language prompt → complete draw.io XML.
  • architect_design — from a brief, produce a High-Level Design diagram (optionally an LLD + design doc).
  • whoami — verify your API key + see remaining quota.

Behind the scenes it calls the DrawX public API, so output matches the DrawX web app exactly.


Requirements

  • Node.js 18+
  • A DrawX API key — create one in DrawX → Settings → API keys. Keys start with drawx_live_. API access is a paid feature (bundled with the DrawX Pro plan).

Install

npm install -g @drawx/mcp-server

Or, if your MCP client supports npx, no install is needed — reference npx @drawx/mcp-server directly.

Configure your MCP client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "drawx": {
      "command": "npx",
      "args": ["-y", "@drawx/mcp-server"],
      "env": {
        "DRAWX_API_KEY": "drawx_live_..."
      }
    }
  }
}

Restart Claude Desktop. In a new chat, ask "Draw me a microservices checkout flow" — Claude will call generate_diagram and show the resulting XML.

Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "drawx": {
      "command": "npx",
      "args": ["-y", "@drawx/mcp-server"],
      "env": { "DRAWX_API_KEY": "drawx_live_..." }
    }
  }
}
VS Code (Copilot MCP)

Add to your workspace or user settings.json:

{
  "mcp": {
    "servers": {
      "drawx": {
        "command": "npx",
        "args": ["-y", "@drawx/mcp-server"],
        "env": { "DRAWX_API_KEY": "drawx_live_..." }
      }
    }
  }
}

Environment variables

VariableRequiredPurpose
DRAWX_API_KEYyesYour DrawX API key (drawx_live_...).
DRAWX_API_BASEnoOverride the API base URL (default https://getdrawx.com/api/v1). Useful for staging.

Tools reference

generate_diagram

Turn a description into draw.io XML.

Inputs

  • prompt (string, required) — what to draw.
  • mode — "flash" (default), "pro", or "ultra". Trades speed for quality.
  • previousXml — an existing mxfile to modify.

Output — assistant text: a summary line (model, tokens, cost) followed by the full <mxfile>...</mxfile> XML in a fenced code block. Paste the XML into diagrams.net or save as .drawio.

architect_design

Run the DrawX Architect Co-Pilot on a brief. Streams intermediate progress; returns a JSON payload with hld (and optional lld, doc).

Inputs

  • brief (string, required, ≥ 20 chars) — what to design.
  • depth — "hld", "hld_lld" (default), or "hld_lld_doc".
  • style — "cloud_agnostic" (default), "aws", "azure", or "gcp".
  • mode — "flash" (default), "pro", or "ultra".
whoami

No inputs. Returns your email, plan, API tier, and remaining monthly API quota.

Quota + rate limits

API usage is metered on a separate tier from your in-app usage. Pro subscribers get 200 API calls / month. The rate limit is 60 requests / minute. On the free plan, API access is not enabled — upgrade at getdrawx.com.

Local development

git clone https://github.com/SaharshPamecha/drawx-mcp-server
cd drawx-mcp-server
npm install
npm run build
DRAWX_API_KEY=drawx_live_... node dist/index.js  # runs over stdio; use an MCP inspector
npm test

License

MIT © 2026 DrawX

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.