npm @drawx/mcp-serverstdioMITupdated 2mo ago
Generate draw.io diagrams and architecture designs from inside Claude, Cursor, or VS Code.
drawx mcp server 能做什么?
@drawx/mcp-server
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
| Variable | Required | Purpose |
|---|---|---|
DRAWX_API_KEY |
yes | Your DrawX API key (drawx_live_...). |
DRAWX_API_BASE |
no | Override 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
安装
把 drawx mcp server 添加到你的客户端。选择你正在使用的那个。
claude mcp add mcp-server -- npx -y @drawx/mcp-servercodex mcp add mcp-server -- npx -y @drawx/mcp-serveramp mcp add mcp-server -- npx -y @drawx/mcp-server{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-server","command":"npx","args":["-y","@drawx/mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@drawx/mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@drawx/mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @drawx/mcp-serverRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
评分
39 / 100
不完整
- 文档25/25
- 维护16/25
- 可信度13/20
- 能力0/15
- 安装体验12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 61 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 0.1.1最新 | 2026年7月2日 |