
drawman
Architecture, flowchart, sequence, state, class, and ER diagrams drawn as editable draw.io files from code or text.
- GitHub stars
- 5
What it does
- Adds
create_architecture_diagram,create_flowchart,create_sequence_diagram,create_state_diagram, andcreate_class_diagramtools for diagram generation - Offers a repository analysis step that scans for workflows, Terraform, Bicep, and Dockerfiles, citing
file:lineevidence - Uses a deterministic layout and router so the model only describes components and connections, keeping output small and fast
- Designed for developers who want clean, editable diagrams from their codebase without manual layout work
draw.io on steroids. Turn any codebase or description into editable draw.io diagrams: architecture, flowcharts, sequence, state, class and ER.
Add marketplace
/plugin marketplace add zamalali/drawmanRun it inside Claude Code once, then install the plugin below.
Install
/plugin install drawman@drawmanRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceArchitecture diagrams with Drawman
The drawman MCP server turns a description or a real codebase into a native, editable draw.io diagram.
You never write coordinates or XML: you describe what exists and how it connects, and the server computes the layout,
platform frames, official icons and obstacle-free orthogonal routing.
Which tool
| The user wants | Call |
|---|---|
| The architecture of this project / a repo / a folder / a git URL | analyze_repository with repository: "." (or the folder, owner/repo, or the URL) |
| A cloud or software architecture they describe | create_architecture_diagram |
| A flowchart, process, workflow, approval flow, decision tree or runbook (steps with Yes/No decisions) | create_flowchart |
| How a request / login / payment flows between services, "what happens when ...", API call chains | create_sequence_diagram |
| The lifecycle or statuses of something (order, ticket, payment, connection) | create_state_diagram |
| A domain model, object-oriented design, design pattern, the types in a codebase | create_class_diagram |
| A database schema, data model, tables and relations (SQL, migrations, ORM models) | create_er_diagram |
| Anything else connected: ML model (e.g. a Transformer), concept map, org chart, data pipeline in the abstract | create_diagram |
Spatial pictures (floor plans, maps, UI mockups, charts of data) are out of scope: say so instead of forcing them into a diagram. For diagrams of real code (class or ER diagrams of this project), read the relevant source files first and draw what is there.
Rules
- Always pass
workspacewith the absolute path of your current working directory: some agents start this server in another folder, and the path tells it which project to read and where to save the.drawiofile. - Never ask clarifying questions first; make sensible senior-architect assumptions and state them afterwards.
analyze_repositoryscans the code deterministically (CI/CD, Terraform, Bicep, CloudFormation/CDK, docker-compose, Kubernetes, SAP MTA, dependencies) with file:line evidence. If it returns the evidence instead of a diagram, YOU are the architect: derive nodes and interfaces from that evidence only, then callcreate_architecture_diagramwithrepositoryset to the repository name it reported, so the server re-applies the evidence-based release path.- Use only the
kindvalues listed in the tool description; the kind decides the platform frame, zone and icon. Use cloud-specific kinds only for a cloud the code proves; containers, compose and Kubernetes use the open-source kinds. - To change a diagram, call the same tool again with the COMPLETE updated lists.
After the diagram is drawn
- In terminal agents the diagram is saved to
diagrams/<title>.drawioin the workspace; the tool result contains the path. Tell the user the path, and that it opens in draw.io desktop, app.diagrams.net or the VS Code "Draw.io Integration" extension, where every shape is editable. - In hosts with MCP Apps (VS Code chat, Claude Desktop, Cursor) the diagram builds itself live in the chat.
- Summarise the architecture in 3-6 bullets citing the interface numbers (IF-01, IF-02, ... or F-01 for general diagrams); for flowcharts, walk through the main path and each decision. Never paste XML, JSON or coordinates.
From the zamalali/drawman README
Drawman
draw.io on steroids
Four prompts, four live diagrams: a Google Cloud production platform, a hybrid SAP BTP + Azure + on-premises S/4HANA architecture, an e-commerce ER schema and a ride-hailing UML class model, each designed by the model and drawn live as an editable draw.io diagram
Much cheaper, extremely fast, high-quality diagrams for AI coding agents. The model writes a short description of what exists and how it connects; a deterministic engine does the layout, routing and draw.io XML. That keeps output tokens tiny, diagrams appear in seconds, and every result is clean and fully editable in draw.io.
Architecture (cloud, on-premises, SAP, AI systems with official icons), flowcharts with swimlanes, sequence diagrams,
state machines, UML class diagrams, ER diagrams and repository analysis, in any direction (top-down, left-to-right,
right-to-left, bottom-up). Watch it build inside the chat, drag shapes and the lines re-route live, ask for changes
and only the change is sent and drawn while everything else stays where it was, then export a native .drawio file.
It ships as an MCP server with an MCP App view, so it runs in VS Code (GitHub Copilot), Claude, Copilot CLI, Cursor, or any MCP host. There is also a VS Code extension and a standalone chat UI.
Install
Requires Node.js 20.11 or newer. Nothing to host, no API key: it runs locally next to your agent.
Everything at once
Finds every supported AI tool and IDE on your machine and adds Drawman to each one:
npx -y drawman install
It keeps your existing settings, leaves configs it cannot parse safely untouched, and changes nothing when run twice.
Check the setup with npx -y drawman doctor; remove it with npx -y drawman uninstall.
Claude Code
claude mcp add -s user drawman -- npx -y drawman
Optional plugin that also teaches Claude when to draw:
claude plugin marketplace add zamalali/drawman
claude plugin install drawman@drawman
GitHub Copilot CLI
copilot mcp add drawman -- npx -y drawman
Optional plugin that also teaches Copilot when to draw:
copilot plugin marketplace add zamalali/drawman
copilot plugin install drawman@drawman
VS Code (GitHub Copilot)
Install in VS Code, or from a terminal:
code --add-mcp '{"name":"drawman","command":"npx","args":["-y","drawman"]}'
In Windows PowerShell, escape the inner quotes:
code --add-mcp '{\"name\":\"drawman\",\"command\":\"npx\",\"args\":[\"-y\",\"drawman\"]}'
Cursor
Codex CLI
codex mcp add drawman -- npx -y drawman
Claude Desktop, Windsurf, Antigravity, Gemini CLI and any other MCP host
Add this to the host's MCP config file:
{
"mcpServers": {
"drawman": { "command": "npx", "args": ["-y", "drawman"] }
}
}
| Host | Config file |
|---|---|
| Claude Desktop | %APPDATA%\Claude\claude_desktop_config.json (Windows), ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Antigravity | ~/.gemini/antigravity/mcp_config.json |
| Gemini CLI | ~/.gemini/settings.json |
On Windows, use "command": "cmd", "args": ["/c", "npx", "-y", "drawman"], because these hosts start servers without a
shell. Then restart the host.
Try it
Ask your agent: "draw the architecture of this repository", "sequence diagram of the OAuth login", "ER diagram for an e-commerce schema", "flowchart for handling a customer refund request" or "draw a Transformer".
Hosts that render MCP Apps (VS Code with Copilot, Cursor, Claude Desktop) show the live canvas in the chat, with
drag-to-edit, Download and Open in draw.io. Terminal agents (Claude Code, Copilot CLI, Codex, Gemini CLI) get
diagrams/<title>.drawio in the project plus a diagrams/<title>.drawio.html link that opens it in the draw.io web
editor. The diagram travels in the URL fragment, so it is never uploaded anywhere. More in
docs/integrations.md.
Updating
Nothing to reinstall: npx -y drawman starts the latest release, and the plugins start the latest 0.2.x. Restart the
server to pick up a new version (VS Code: MCP: List Servers → drawman → Restart, or reload the window; terminal
agents: start a new session).
Remote / shared (Streamable HTTP)
npx -y drawman serve --port 3001 # http://127.0.0.1:3001/mcp, stateless, localhost only; put auth in front before exposing it
Without any agent
render turns a JSON graph into a .drawio file; examples/order-platform.json is one.
npx -y drawman render order-platform.json -o order.drawio
npx -y drawman analyze ./my-service -o my-service.drawio # needs DRAWMAN_LLM_* (see .env.example)
From source
git clone https://github.com/zamalali/drawman && cd drawman
npm install
npm run build # downloads official icons (see NOTICE), builds the view, web UI and CLI
npm test
npm run build:vscode # optional: dist/drawman.vsix, a VS Code extension that registers the server itself
DRAWMAN_LLM_URL=... DRAWMAN_LLM_KEY=... npm start # standalone chat UI on :5179
Why the diagrams look good
The model never places anything. It only describes what exists and how it talks, as a semantic graph over a closed vocabulary of about 150 kinds. Everything visual is deterministic:
| Layer | What it does |
|---|---|
| Vocabulary | each kind fixes its platform frame, its zone (edge, runtime, data, AI, security…) and its official icon |
| Layout | frames per platform, zones in columns, components ordered along the flow |
| Router | orthogonal A* on a 10 px grid: cards are hard obstacles; bends, overlaps, crossings and port reuse cost extra |
| Validation | unknown kinds are repaired through hints, dangling edges dropped, overlaps rejected before anything is shown |
| Repository analysis | deterministic scan with file:line evidence (workflows, Terraform, Bicep, SAP MTA, Dockerfiles, dependencies) → model → release-path enforcement from evidence |
Because the hard part is not the model's job, mid-size models produce the same quality as frontier models.
Tools
| Tool | Purpose |
|---|---|
create_architecture_diagram | title, subtitle, nodes {id, kind, title, detail, status, group?}, interfaces {from, to, label, protocol, description}; optional containers {id, title, parent?} only when the request names them (VPC, subnets, clusters, namespaces, regions), otherwise platform frames and zones are drawn automatically, left to right; with containers an optional direction (LR horizontal, TB vertical) |
create_flowchart | flowcharts, processes, approval flows, decision trees: real flowchart shapes (start/end, process, decision, data, document, database, sub-process), Yes/No branches, optional swimlanes, top-down or left-right |
create_sequence_diagram | API / auth / payment call flows: native UML lifelines, activation bars, sync / async / return messages, alt opt loop par fragments, notes |
create_state_diagram | lifecycles and statuses: initial / final / choice pseudo-states, event [guard] / action transitions, entry / exit activities |
create_class_diagram | domain models and OO designs: class / interface / abstract / enum boxes with attributes and methods, inheritance, realisation, composition, aggregation, association, dependency |
create_er_diagram | database schemas: tables with typed columns, PK / FK, crow's-foot cardinalities |
create_diagram | any other connected diagram (ML models, concept maps, org charts): optional groups {id, title, parent?} that can nest, nodes (a node without a group stays outside every group), interfaces |
analyze_repository | ".", a workspace folder, owner/repo or an https git URL; optional ref, focus |
edit_diagram | follow-up changes to a diagram already drawn: its id plus only what changes (add_nodes, add_connections, add_groups, update, remove, direction). Everything already drawn, including shapes the user dragged, keeps its place and lines; a new node joins its zone and what sits below slides down to make room. A new direction (LR horizontal, TB vertical) lays the diagram out afresh, as does a change the earlier arrangement cannot hold. Ids that are not in the diagram are skipped and named. A follow-up takes seconds and a few hundred tokens instead of a full redraw |
All of them accept workspace (the absolute project path), which agents that start servers outside the project (Copilot
CLI) pass so files are read from, and saved to, the right folder.
analyze_repository derives the architecture with a configured OpenAI-compatible endpoint, or hands the evidence to the
calling agent, which then draws the diagram while the server still applies the evidence-based release path. No key is
required. MCP sampling (the host's model) is opt-in with DRAWMAN_SAMPLING=1, because some headless hosts
announce it but never answer.
Organisation profiles
Company conventions stay out of the code. Point DRAWMAN_PROFILE at a JSON file
(example) with conventions (added to the tool descriptions and the architect prompt),
hints (internal product names → kinds), endpoints (internal hostnames → kinds), githubHost and defaults.
Security
- Only folders inside the workspace are read:
DRAWMAN_WORKSPACE_ROOTS, else the host's roots, else the project directory. Home, drive roots and the plugin folder are never used as a workspace; symlinks are skipped. - Remote clones are shallow, https/ssh only (
GIT_ALLOW_PROTOCOL), refs are validated, symlinks are not checked out;DRAWMAN_ALLOW_CLONE=0disables them. - Credential files (
.env, keys, keystores, tfstate, service-account JSON…) are never read; secrets in other files are masked before anything leaves the machine. - The view runs in the host's sandboxed iframe with no network access; all user text is escaped.
- The HTTP servers bind to localhost and reject foreign
Host/Originheaders (DNS rebinding); widen withDRAWMAN_ALLOWED_HOSTS.
See SECURITY.md.
Project layout
src/engine vocabulary, layout, A* router, draw.io XML (pure, no I/O)
src/repo scanner, repository resolver, architect, release-path enforcement
src/mcp MCP server (tools + MCP App resource), Streamable HTTP
src/view the MCP App (live canvas, drag-to-edit, export)
src/host standalone chat UI (an MCP Apps host in the browser)
vscode VS Code extension (MCP server definition provider)
scripts icon builder (official sources), bundler
License
Apache-2.0. Vendor icons are downloaded at build time from their official sources and are subject to their owners' terms; see NOTICE.
Details
- Marketplace
- zamalali/drawman
- Source
- plugins/drawman
- Category
- Diagrams
Similar to drawman
More Sales & Marketing
ruflo-consoleruvnet/ruflo82.2K starsEarly access: ruflo's cockpit as a Claude Code mod (function hooks) and the one /ruflo command for every ruflo mod — overview with health alerts, swarm topology
diagram-designcathrynlavery/diagram-design68K starsEditorial diagrams in your brand, as self-contained HTML and SVG. Architecture, flowcharts, sequence, state machines, ER and database schemas, timelines, swimla
marketing-skillscoreyhaines31/marketingskills61.1K stars53 marketing skills for technical marketers and founders: CRO, copywriting, cold email, prospecting, SEO, AI SEO, paid ads, SMS, ad creative, video production,
academic-research-skillsImbad0202/academic-research-skills58K stars5 skills + 35 modes + Material Passport pipeline. Includes v3.6.7 cross-model audit gate and v3.6.8 generator-evaluator contract.
Apollo AutomationComposioHQ/awesome-claude-skills51.5K starsAutomate Apollo.io lead generation -- search organizations, discover contacts, enrich prospect data, manage contact stages, and build targeted outreach lists --
activecampaignanthropics/claude-plugins-official47.9K starsMarketing automation, CRM, and email marketing powered by ActiveCampaign. Manage contacts, campaigns, automations, deals, and get AI-powered marketing insights