Tooling

Wire MCP server

Model Context Protocol server for Wire. Lets any MCP-compatible agent (Claude Desktop, Claude Code, Cursor, custom CUA) author and edit Wire diagrams as structured graphs — and render them to SVG or PNG. Stdio + streamable-HTTP transports out of the box.

Terminal
npm install @aigentive/wire-mcp
# optional — for PNG output
npm install @resvg/resvg-js
Terminal
# stdio — local IDE / desktop clients
node node_modules/@aigentive/wire-mcp/dist/server.js

# streamable HTTP — cloud / network clients
node node_modules/@aigentive/wire-mcp/dist/server.js --http

# When installed globally
wire-mcp           # stdio
wire-mcp --http    # http on port 3860
VariableDefaultPurpose
WIRE_STORAGE_DIR~/.wire/diagramsDirectory for *.json diagram files
WIRE_HTTP_PORT3860HTTP transport port
WIRE_HTTP_HOST127.0.0.1HTTP transport host
WIRE_AUDIT_LOG(stderr only)JSONL audit log file path
WIRE_DEFAULT_LAYOUTLRDefault layout direction
WIRE_PREVIEW_BASEWIRE_CLOUD_URL or http://localhost:3870Optional override for preview links
WIRE_CLOUD_URL(unset)Wire Cloud base URL for authenticated sync
WIRE_CLOUD_API_KEY(unset)Wire Cloud API key generated by an authenticated user
WIRE_PNG_ENABLEDfalseEnable PNG rasterization (requires @resvg/resvg-js)
WIRE_AGENT_IDwire-mcpAudit log actor id
Diagram lifecycle
create_diagramCreate a new diagram, optionally seeded from a template (agent-workflow, approval-flow, rag-pipeline).
load_diagramLoad a stored diagram by id.
save_diagramOverwrite a diagram with full JSON; validates before write.
patch_diagramPatch top-level diagram fields (`null` clears a field).
list_diagramsList stored diagrams (recency-sorted).
get_diagram_jsonReturn raw canonical JSON.
Nodes
add_nodeAppend a node (any kind), optionally wired via `from` / `branch`.
update_nodePatch fields on a node (`null` to clear).
remove_nodeRemove a node and prune incoming refs.
move_nodePersist node position.
resize_nodePersist node size.
Edges
connectConnect two nodes; supports edge ids, branches, labels, handles, style, label style, routing, and data.
disconnectRemove a connection (branch-aware sweep when `branch` omitted).
update_edgePatch an explicit edge by id (handles, style, labelStyle, routing, etc.).
remove_edgeRemove an explicit edge by id.
Structure
add_noteAdd an annotation; `attachedTo` for visual association.
add_groupAdd a group node and optionally parent existing children.
ungroupClear children/parent links for a group.
set_layoutChange layout direction/engine.
patch_metadataPatch diagram.metadata keys.
Bulk + validation
apply_actionsApply a batch of WireAction mutations atomically.
validateRun schema + structural validation; returns issue codes + repair hints.
Render + export
render_svgServer-side SVG render.
render_pngPNG via @resvg/resvg-js (falls back to SVG when not installed).
render_previewReturn browser and raw asset URLs; cloud share URLs when cloud sync is configured.
summarize_diagramPlain-text summary (counts by kind, triggers, ends, branches).
export_mermaidConvert to Mermaid `flowchart` syntax.
Agent guidance
v1_get_agent_guideReturn the concise MCP agent operating guide for live instructions.
v1_get_docs_shapeReturn machine-readable docs chunks by topic or natural-language task.
json
{
  "diagramId": "agent-router",
  "id": "route-sales",
  "from": "route.sales",
  "to": "notify-sales",
  "label": "sales",
  "fromHandle": "right",
  "toHandle": "left",
  "routing": "smoothstep",
  "style": { "markerEnd": "arrow", "strokeWidth": 2 },
  "labelStyle": { "background": "#ffffff", "fontSize": 12 }
}
URIPurpose
wire://diagrams/{id}.jsonCanonical JSON for a stored diagram.
wire://diagrams/{id}.svgServer-rendered SVG.
wire://diagrams/{id}.pngPNG rasterization (or SVG fallback).
wire://diagrams/{id}.mermaidMermaid `flowchart` syntax.
wire://diagrams/{id}/previewBrowser preview URL.
wire://templates/List available templates.
wire://templates/{name}Fetch a single template.
wire://schemas/wire-diagramJSON schema info.
wire://docs/Machine-readable docs manifest.
wire://docs/agent-guide.mdPrompt-ready agent guide.
wire://docs/{topic}.shape.jsonTopic docs for agent, mcp, react, cloud, schema, validation, examples, or recipes.
wire://docs/examples/{name}.wire.jsonValidated example diagrams.
wire://docs/recipes/{id}.jsonTask recipes for agents.
NamePurpose
diagram_from_codebaseGenerate an architecture diagram from a repo.
diagram_from_logsReconstruct a workflow from log lines.
diagram_from_workflow_descriptionConvert prose into a diagram.
review_diagram_for_clarityCritique an existing diagram.
simplify_diagramRefactor for clarity.
json
{
  "mcpServers": {
    "wire": {
      "command": "node",
      "args": ["/absolute/path/to/wire/packages/wire-mcp/dist/server.js"],
      "env": {
        "WIRE_STORAGE_DIR": "/Users/me/Documents/wire-diagrams"
      }
    }
  }
}
NextWire CLI