archdraw-mcp-server

v1.2.1
@hiabhee/archdraw-mcp-server Checked 1 hour ago Published 24 days ago

MCP 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):…

ParameterTypeDescription
customFeaturesarrayCustom features/components the user explicitly requested.
diagramDescriptionstringOne-sentence description of what this architecture does
directionstringLayout direction: RIGHT (LR, default), DOWN (TB for pipelines)
edgesarrayLegacy 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.
labelstringDiagram title
mermaidstringRECOMMENDED: Mermaid code for the diagram (graph LR or graph TD with subgraphs). Uses the web pipeline parser + Dagre layout.
nodesarrayLegacy 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…
publishbooleanCreate a preview link (default true). Set false only when the user asks to keep the diagram private.
techStackarrayExplicit technologies/services extracted from the prompt (e.g. ["Next.js", "PostgreSQL 15"]).
userPromptstringThe user's original request verbatim. Subtitle content must reflect any tech stack/services the user named.
workingSessionIdstringOpaque 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…

ParameterTypeDescription
templateId *stringTemplate identifier: archflow, chatgpt, instagram, rideshare, ecommerce
customizationsobjectOptional customizations to apply
publishbooleanCreate a preview link (default true). Set false only when the user asks to keep the diagram private.
workingSessionIdstringOpaque 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).

ParameterTypeDescription
sessionIdstringOptional session ID to load before returning state (e.g. from a diagramUrl the user shared).
workingSessionIdstringThe 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.

ParameterTypeDescription
addEdgesarrayEdges to add
addNodesarrayNodes to add
removeEdgeIdsarrayEdge IDs to remove
removeNodeIdsarrayNode IDs to remove
updateNodesarrayNodes to update
workingSessionIdstringThe 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…

ParameterTypeDescription
arrangementstringflow (default) or zones.
directionstringMain flow direction. Default LR.
expectedRevisionnumberOptional: refuse if the published diagram changed since this revision.
foldbooleanWrap a long flow into rows to fit a 16:9 screen. Default true.
groupDirectionsobjectForce the direction inside particular groups, by id.
labelstring
mixDirectionsbooleanLet groups run the other way when that fits better. Default true.
publishbooleanUpdate the shareable preview link. Default true.
stylestringLook of the preview and shareable image. Default studio.
workingSessionIdstringThe 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…

ParameterTypeDescription
ops *arrayDrawing operations, applied in order (1-200). All apply or none do.
expectedRevisionnumberOptional: refuse if the published canvas changed since this revision.
labelstringTitle for a new canvas.
publishbooleanCreate / update the shareable preview link. Default true.
stylestringLook 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…
workingSessionIdstringThe workingSessionId from an earlier call about this canvas. Required on the hosted server for edits; omit it there to start a new canvas.