DrawArch MCP
Generates natively editable diagrams.net (.drawio) architecture diagrams from scene graphs, with support for reference-image recreation, validation, and structural comparison.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DrawArch MCPGenerate an editable drawio architecture diagram for a microservices setup with API gateway."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DrawArch MCP
DrawArch turns architecture descriptions and reference images into portable, natively editable diagrams.net (.drawio) files through the Model Context Protocol.
The connected ChatGPT, Claude, Codex, Cursor, or other MCP host does the visual reasoning. DrawArch does not require or call a second LLM API. It validates the host model's scene graph, resolves and safely embeds real icons or images, renders exact absolute geometry, checks fidelity, and returns the .drawio file directly as an MCP artifact.
Why DrawArch
Recreate a supplied reference image as independent editable shapes, text, icons, containers, and connectors.
Generate architecture diagrams from structured components and flows.
Use bundled icons, opt-in Iconify-compatible online icons, user-provided images, or approved HTTPS image URLs.
Keep every asset inside the
.drawiofile; outputs do not depend on hotlinks.Run locally over stdio or as a shared Streamable HTTP MCP server.
Protect remote deployments with bearer authentication, host/origin allowlists, SSRF controls, size limits, SVG sanitization, and raster re-encoding.
Preserve approved plans as immutable revisions and reject stale approval tokens.
Related MCP server: diagram-ai-generator
Quick start
Requires Node.js 20 or newer.
npx -y drawarch-mcpLocal MCP configuration:
{
"mcpServers": {
"drawarch": {
"command": "npx",
"args": ["-y", "drawarch-mcp"],
"env": {
"DRAWARCH_OUTPUT_DIR": "/absolute/path/to/diagrams",
"DRAWARCH_ONLINE_ASSETS": "false"
}
}
}
}For an unpublished checkout, run npm install && npm run build, then replace the command with node and the args with the absolute path to dist/src/index.js.
Reference-image workflow
Attach an image to your MCP host and ask it to recreate the image with DrawArch. The intended tool sequence is:
The host vision model analyzes the image and calls
prepare_reference_recreationwith an absolute scene graph.The host or user reviews the plan and approved asset sources. An approved preparation returns a revision-bound token.
The host calls
create_reference_drawio; DrawArch resolves and embeds assets, renders exact coordinates, validates the file, and returns it as a resource.compare_reference_recreationreports structural coverage. The host can revise the plan and repeat until the target is met.
Each visible object remains editable. Connectors retain source/target attachment, ports, and waypoints. See the complete reference-plan example.
Run a shared remote MCP server
DRAWARCH_TRANSPORT=http \
HOST=0.0.0.0 \
PORT=3000 \
DRAWARCH_API_KEY=replace-with-a-long-random-secret \
DRAWARCH_APPROVAL_SECRET=replace-with-another-random-secret \
DRAWARCH_ALLOWED_HOSTS=drawarch.example.com \
DRAWARCH_ALLOWED_ORIGINS=chatgpt.com,claude.ai \
DRAWARCH_ONLINE_ASSETS=true \
npx -y drawarch-mcpEndpoints:
POST /mcp— Streamable HTTP MCPGET /health— public health probeGET /files/<safe-name>.drawio— authenticated output download
Connect ChatGPT or Claude to https://drawarch.example.com/mcp and set Authorization: Bearer <DRAWARCH_API_KEY> in the connector configuration. ChatGPT cannot directly spawn a local stdio process; use the remote server for ChatGPT, or a supported development tunnel while testing.
Docker:
docker build -t drawarch-mcp .
docker run --rm -p 3000:3000 \
-e DRAWARCH_API_KEY=replace-me \
-e DRAWARCH_APPROVAL_SECRET=replace-me-too \
-e DRAWARCH_ALLOWED_HOSTS=localhost,127.0.0.1 \
-v drawarch-data:/data \
drawarch-mcpOr use the published image: ghcr.io/ajey95/drawarch-mcp:0.2.0.
MCP tools
Tool | Purpose |
| List six built-in diagram themes. |
| Search the bundled real-world icon catalog. |
| Resolve a bundled or opt-in online icon with provenance. |
| Generate a deterministic themed architecture diagram. |
| Validate a generated architecture file. |
| Store an absolute editable scene graph and optionally approve its sources. |
| Create an immutable next revision; prior approvals become stale. |
| Read the current revision for review. |
| Render an approved reference plan and return the |
| Validate a recreated file. |
| Score structural coverage against the plan. |
Asset modes
Reference assets support four explicit modes:
bundled: a DrawArch-owned MIT SVG selected by query.online: an Iconify-compatible SVG selected by query; server opt-in is required.data: a user-supplied SVG, PNG, JPEG, or WebP data URI.remote: an approved HTTPS image URL; server opt-in is required.
Remote fetching rejects credentials, non-HTTPS URLs, custom ports, private/reserved DNS answers, unsafe redirects, oversized content, active SVG content, and excessive raster dimensions. Raster images are decoded and re-encoded before embedding. Online assets retain their provider/license metadata; users remain responsible for verifying third-party license terms.
Configuration
Variable | Default | Meaning |
|
|
|
|
| Restricted output and plan-storage directory. |
|
| Enables opt-in online and remote image sources. |
| Iconify API | HTTPS Iconify-compatible provider. |
|
| HTTP bind host. |
|
| HTTP port. |
| unset | Optional bearer token for |
| random/process | HMAC secret for revision-bound approvals; set it for shared deployments. |
| local hosts | Comma-separated accepted Host values. |
| local origins | Comma-separated accepted Origin hosts. |
| listener URL | Public base URL advertised by the process. |
Development
npm install
npm test
npm run build
npm run sample
npm pack --dry-runArchitecture and security details are in ARCHITECTURE.md. Contributions are welcome; read CONTRIBUTING.md, SECURITY.md, and the Code of Conduct.
License
DrawArch code and bundled assets are MIT licensed. Third-party assets keep their own provider licenses and attribution.
This server cannot be installed
Maintenance
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
- AlicenseAqualityDmaintenanceEnables users to generate professional AWS architecture diagrams, sequence diagrams, flow charts, and class diagrams using Python code through the diagrams package. Supports customizable styling and secure diagram generation for cloud infrastructure visualization.3Apache 2.0
- Alicense-qualityCmaintenanceProfessional AI-powered architecture diagram generator with multi-cloud support and MCP server integration. Generates beautiful, accurate diagrams with provider-specific icons for AWS, Azure, GCP, Kubernetes, and more.10MIT
- Alicense-qualityCmaintenanceEnables creating and editing Draw.io diagrams via natural language, supporting shapes, connectors, and multi-line text.2MIT
- Alicense-qualityDmaintenanceEnables creation of Azure architecture diagrams from natural language descriptions, generating PNG images automatically.MIT
Related MCP Connectors
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Create diagrams in chat, rendered as live interactive draw.io diagrams. 10,000+ searchable shapes.
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Ajey95/drawarch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server