{
  "markdown": "# @drawx/mcp-server\n\n[![npm version](https://img.shields.io/npm/v/@drawx/mcp-server.svg)](https://www.npmjs.com/package/@drawx/mcp-server)\n[![CI](https://github.com/SaharshPamecha/drawx-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/SaharshPamecha/drawx-mcp-server/actions/workflows/ci.yml)\n[![license: MIT](https://img.shields.io/npm/l/@drawx/mcp-server.svg)](./LICENSE)\n\n**Generate draw.io diagrams and architecture designs from inside Claude, Cursor, or VS Code.**\n\nDrawX MCP is a [Model Context Protocol](https://modelcontextprotocol.io) server that gives your AI assistant three tools:\n\n- **`generate_diagram`** — one-shot: natural-language prompt → complete draw.io XML.\n- **`architect_design`** — from a brief, produce a High-Level Design diagram (optionally an LLD + design doc).\n- **`whoami`** — verify your API key + see remaining quota.\n\nBehind the scenes it calls the DrawX public API, so output matches the DrawX web app exactly.\n\n---\n\n## Requirements\n\n- **Node.js 18+**\n- A **DrawX API key** — create one in [DrawX](https://getdrawx.com) → Settings → API keys. Keys start with `drawx_live_`. API access is a paid feature (bundled with the DrawX Pro plan).\n\n## Install\n\n```bash\nnpm install -g @drawx/mcp-server\n```\n\nOr, if your MCP client supports `npx`, no install is needed — reference `npx @drawx/mcp-server` directly.\n\n## Configure your MCP client\n\n### Claude Desktop\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"drawx\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@drawx/mcp-server\"],\n      \"env\": {\n        \"DRAWX_API_KEY\": \"drawx_live_...\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. In a new chat, ask *\"Draw me a microservices checkout flow\"* — Claude will call `generate_diagram` and show the resulting XML.\n\n### Cursor\n\nEdit `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"drawx\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@drawx/mcp-server\"],\n      \"env\": { \"DRAWX_API_KEY\": \"drawx_live_...\" }\n    }\n  }\n}\n```\n\n### VS Code (Copilot MCP)\n\nAdd to your workspace or user `settings.json`:\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"drawx\": {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@drawx/mcp-server\"],\n        \"env\": { \"DRAWX_API_KEY\": \"drawx_live_...\" }\n      }\n    }\n  }\n}\n```\n\n---\n\n## Environment variables\n\n| Variable | Required | Purpose |\n|---|---|---|\n| `DRAWX_API_KEY` | yes | Your DrawX API key (`drawx_live_...`). |\n| `DRAWX_API_BASE` | no | Override the API base URL (default `https://getdrawx.com/api/v1`). Useful for staging. |\n\n## Tools reference\n\n### `generate_diagram`\nTurn a description into draw.io XML.\n\n**Inputs**\n- `prompt` (string, required) — what to draw.\n- `mode` — `\"flash\"` (default), `\"pro\"`, or `\"ultra\"`. Trades speed for quality.\n- `previousXml` — an existing mxfile to modify.\n\n**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](https://app.diagrams.net) or save as `.drawio`.\n\n### `architect_design`\nRun the DrawX Architect Co-Pilot on a brief. Streams intermediate progress; returns a JSON payload with `hld` (and optional `lld`, `doc`).\n\n**Inputs**\n- `brief` (string, required, ≥ 20 chars) — what to design.\n- `depth` — `\"hld\"`, `\"hld_lld\"` (default), or `\"hld_lld_doc\"`.\n- `style` — `\"cloud_agnostic\"` (default), `\"aws\"`, `\"azure\"`, or `\"gcp\"`.\n- `mode` — `\"flash\"` (default), `\"pro\"`, or `\"ultra\"`.\n\n### `whoami`\nNo inputs. Returns your email, plan, API tier, and remaining monthly API quota.\n\n## Quota + rate limits\n\nAPI 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](https://getdrawx.com).\n\n## Local development\n\n```bash\ngit clone https://github.com/SaharshPamecha/drawx-mcp-server\ncd drawx-mcp-server\nnpm install\nnpm run build\nDRAWX_API_KEY=drawx_live_... node dist/index.js  # runs over stdio; use an MCP inspector\nnpm test\n```\n\n## License\n\nMIT © 2026 DrawX\n",
  "bytes": 4199,
  "sha": "a3e5898eecd61078b4fbdfba90b907a65256c671d0f3f08e7be0fde7f3083611",
  "repo_slug": "saharshpamecha/drawx-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_saharshpamecha_drawx_mcp_serve_d087dfe5/readme"
}