archdraw-mcp-server
v1.2.1MCP server for ArchDraw architecture diagramming tool
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_diagram Generate an ArchDraw diagram
Generate a rich architecture diagram with groups, labeled edges, and visual hierarchy. Compatible chat clients display the result as an inline interactive preview; text-only clients receive a concise summary and the ArchDraw site link. Include the returned preview link (shareUrl) and edit link (diagramUrl) in your reply: in clients without the inline preview, the links are how the user sees the diagram. Links are created by default in the same response (no extra call needed); they are unguessable, view-by-link, and expire after 7 days. **INPUT MODES — choose ONE**: **Mode 1 (RECOMMENDED):…
| Parameter | Type | Description |
|---|---|---|
customFeatures | array | Custom features/components the user explicitly requested. |
diagramDescription | string | One-sentence description of what this architecture does |
direction | string | Layout direction: RIGHT (LR, default), DOWN (TB for pipelines) |
edges | array | Legacy JSON mode (only if not using mermaid). Array of edges. REQUIRED. Add labels to all async/event/stream edges. Do not connect data tier directly to client tier. |
label | string | Diagram title |
mermaid | string | RECOMMENDED: Mermaid code for the diagram (graph LR or graph TD with subgraphs). Uses the web pipeline parser + Dagre layout. |
nodes | array | Legacy JSON mode (only if not using mermaid). Array of nodes. RULES: (1) every node needs id+label+tier+subtitle, (2) include at least one isGroup:true node, (3) use parentId to nest nodes inside grou… |
publish | boolean | Create a preview link (default true). Set false only when the user asks to keep the diagram private. |
techStack | array | Explicit technologies/services extracted from the prompt (e.g. ["Next.js", "PostgreSQL 15"]). |
userPrompt | string | The user's original request verbatim. Subtitle content must reflect any tech stack/services the user named. |
workingSessionId | string | Opaque local workspace key. Resend it to keep parallel diagrams isolated. |
apply_template Apply an ArchDraw template
Apply a pre-built architecture template with pre-defined nodes and edges. Compatible chat clients display the result as an inline preview. **USE WHEN**: User wants a common architecture pattern (e-commerce, chat app, rideshare, etc.) **OUTPUT**: Full diagram with positioned nodes and edges, plus a preview link (shareUrl) and edit link (diagramUrl) created by default. Include those links in your reply. Pass publish:false only if the user asks to keep it private. **AVAILABLE TEMPLATES**: - archflow: ArchDraw's own architecture (modern SaaS) - chatgpt: LLM chat app with RAG, vector DB, streamin…
| Parameter | Type | Description |
|---|---|---|
templateId * | string | Template identifier: archflow, chatgpt, instagram, rideshare, ecommerce |
customizations | object | Optional customizations to apply |
publish | boolean | Create a preview link (default true). Set false only when the user asks to keep the diagram private. |
workingSessionId | string | Opaque local workspace key for isolating parallel diagrams. |
get_diagram_state Read the current ArchDraw diagram
Returns the current diagram's nodes and edges as structured JSON. Call this before update_diagram to read what's on the canvas. Optionally pass a sessionId to load that diagram first (e.g. a link the user opened).
| Parameter | Type | Description |
|---|---|---|
sessionId | string | Optional session ID to load before returning state (e.g. from a diagramUrl the user shared). |
workingSessionId | string | The workingSessionId returned by generate_diagram / apply_template. Required on the hosted server; resend it on every call about that diagram. |
update_diagram Update an ArchDraw diagram
Surgically modifies an existing diagram. Add nodes, remove nodes, add edges, remove edges, or update node properties — without regenerating the whole diagram.
| Parameter | Type | Description |
|---|---|---|
addEdges | array | Edges to add |
addNodes | array | Nodes to add |
removeEdgeIds | array | Edge IDs to remove |
removeNodeIds | array | Node IDs to remove |
updateNodes | array | Nodes to update |
workingSessionId | string | The workingSessionId returned by generate_diagram / apply_template. Required on the hosted server; resend it on every call about that diagram. |
layout_diagram Lay out an ArchDraw diagram
Re-arranges the current diagram with ArchDraw's own layout engine, the same one as the editor's layout toggle. Use it when a diagram looks cramped, too wide or too tall, or the user asks to "tidy", "re-layout", "make it top-down", or fit a screen. Nothing is added or removed: only positions and sizes change, so ids, labels and connections stay the same. For exact manual placement of particular things use draw_on_canvas (move / align / distribute) instead; the two combine well: lay out, then nudge. CONTROLS - direction: LR (left to right, default) or TD (top down). - arrangement: "flow" (ranks…
| Parameter | Type | Description |
|---|---|---|
arrangement | string | flow (default) or zones. |
direction | string | Main flow direction. Default LR. |
expectedRevision | number | Optional: refuse if the published diagram changed since this revision. |
fold | boolean | Wrap a long flow into rows to fit a 16:9 screen. Default true. |
groupDirections | object | Force the direction inside particular groups, by id. |
label | string | |
mixDirections | boolean | Let groups run the other way when that fits better. Default true. |
publish | boolean | Update the shareable preview link. Default true. |
style | string | Look of the preview and shareable image. Default studio. |
workingSessionId | string | The workingSessionId from an earlier call about this diagram. Required on the hosted server. |
draw_on_canvas Draw on an ArchDraw canvas
Draws on a canvas with exact control: place text, empty cards to write in, shapes, panels and dividers, big-number stats, notes, components and groups at precise positions, connect them, restyle, move, align and remove. Use it when the user wants something drawn that generate_diagram's automatic layout cannot give (a whiteboard, a sketch, annotations, a precise arrangement, a simple infographic: steps, a timeline, a comparison, key numbers), or to add to / edit any existing diagram. HOW IT WORKS - Coordinates are canvas pixels: x grows right, y grows DOWN, (x, y) is the top-left corner. A typ…
| Parameter | Type | Description |
|---|---|---|
ops * | array | Drawing operations, applied in order (1-200). All apply or none do. |
expectedRevision | number | Optional: refuse if the published canvas changed since this revision. |
label | string | Title for a new canvas. |
publish | boolean | Create / update the shareable preview link. Default true. |
style | string | Look of the shareable image and preview, matching the editor render styles: sketch (hand-drawn, like a whiteboard; the default), studio (clean), studio-metallic (satin metal), neubrutalism (bold), pre… |
workingSessionId | string | The workingSessionId from an earlier call about this canvas. Required on the hosted server for edits; omit it there to start a new canvas. |