Skip to main content
Glama

Wiri

Wiri is a headless wireframing MCP server designed for an LLM operator. It stores each screen as a small semantic scene graph, lays elements out without absolute coordinates, and closes the editing loop with deterministic renders and lint findings.

The v1 contract is in SPEC.md. The persisted document shape is also available as schemas/wire-document.schema.json.

Requirements

  • Node.js 20.9 or newer

  • A local directory for documents and exports

Wiri runs entirely on the local machine. It makes no network requests and sends no telemetry. Documents, checkpoint history, rendered exports, form values, and annotations are stored as plaintext; do not use production secrets as wireframe content.

Related MCP server: stitch-pro-mcp

Install and run

npm install
npm run build
node dist/index.js --workspace ./wireframes

The process speaks MCP over standard input/output. It writes protocol messages only to stdout and exits when its client disconnects. WIRI_WORKSPACE can set the workspace when --workspace is omitted; the current directory is the final default.

An MCP client configuration can launch the built server like this (use absolute paths in a real configuration):

{
  "mcpServers": {
    "wiri": {
      "command": "node",
      "args": [
        "/absolute/path/to/wiri/dist/index.js",
        "--workspace",
        "/absolute/path/to/wireframes"
      ]
    }
  }
}

For development, npm run dev -- --workspace ./wireframes runs the TypeScript entry point directly.

Canonical workflow

  1. Call create_document, then add one or more screens with create_screen.

  2. Call get_tree before editing a screen that has not been read in the current context.

  3. Prefer one or two atomic batch calls to build a screen. A later operation can refer to a node created by an earlier add with $0, $1, and so on.

  4. Use render for visual feedback and lint for deterministic findings.

  5. Use checkpoint before a larger revision; diff, undo, and redo make changes inspectable and reversible.

  6. Use links or render_flow to verify navigation, then export to produce PNG, SVG, or static HTML.

A compact signup flow can be built in one document with this shape:

welcome --start_btn--> email --continue_btn--> password
password --continue_btn--> verify --verify_btn--> done

Each arrow is simply a to prop on its source button. HTML export turns those links into fragment navigation between screen sections.

Layered application surfaces use constrained anchors rather than freeform coordinates. For example, a full-screen image or map placeholder can use anchor="stretch", while any number of variant="fab" buttons live in stacks anchored to screen corners. Semantic left, right, and bottom drawers are direct children of the same layer.

Storage

The server owns one active document at a time and writes successful mutations before returning:

<workspace>/
  checkout_redesign.wire.json
  checkout_redesign.history.json
  exports/
    ...

Writes use a temporary file plus atomic rename. Opening another document clears session-only undo/redo stacks; named checkpoints persist in the history file. Export files are safe to regenerate and overwrite deterministically.

Commands

npm test          # unit and integration tests
npm run typecheck # strict TypeScript check
npm run build     # emit dist/
npm start -- --workspace ./wireframes

The server intentionally exposes tools only in v1—no MCP resources or prompts. Run node dist/index.js --help for command-line options.

Limits and troubleshooting

  • Names and ids must match [a-z][a-z0-9_]{0,31}.

  • A document supports 50 screens; a screen supports 300 nodes; a batch supports 100 operations.

  • Rendered height is capped at 4000 px.

  • If a call returns NO_ACTIVE_DOCUMENT, call create_document or open_document first.

  • If a parent is rejected, call get_tree and choose root, overlay, or an existing container id.

  • A failed call and a failed batch never change the active graph or its document file.

Wiri reads schema version 1 only. Malformed files, unknown node types, invalid props, or unsupported schema versions are rejected rather than repaired silently.

License notices

Rendered output embeds Inter from @fontsource/inter, distributed under the SIL Open Font License 1.1. See THIRD_PARTY_NOTICES.md.

Available Tools

22 tools
addA

Add one semantic node. parent is a container id, root, or overlay. Props: every node accepts w=hug|fill|integer and h=hug|fill|integer. Containers are stack,layer,card,navbar,sidebar,modal,drawer,list,list_item,tabs and accept dir=v|h, gap, pad, align=start|center|end, justify=start|center|end|between, fill=none|faint|light|dark. A layer overlaps children; its direct children may use anchor=stretch|top_start|top|top_end|start|center|end|bottom_start|bottom|bottom_end. A drawer{title,side=left|right|bottom,open} is layer-only; list accepts only list_item children; tabs accept container panels; modal is overlay-only; sidebar is desktop-only. navbar{title,back}; modal{title,dismiss}; list{dividers}; list_item{title,subtitle,leading,trailing,to}; tabs{active}; text{text,variant=h1|h2|h3|body|caption|label,muted,align,to}; button{text,label,variant=primary|secondary|ghost|danger|fab,icon,pressed,to}; input{label,placeholder,value,kind=text|email|password|number|search,error}; textarea{label,placeholder,rows}; select/radio_group{label,options,value}; checkbox{label,checked}; toggle{label,on}; image{label,aspect=16:9|1:1|4:3}; icon{icon,size,to}; avatar{label,size}; badge{text,tone=neutral|success|warn|danger}; table{columns=string array,rows=0..100 integer placeholder-row count}. Icon names: menu,close,search,back,chevron_right,chevron_down,plus,minus,check,user,settings,home,bell,heart,star,trash,edit,filter,calendar,upload,download,more,cart,info,warning,compass,locate,play,stop. Example: {"screen":"checkout","parent":"root","type":"button","name":"pay_btn","props":{"text":"Pay","w":"fill"}}.

Inputs: type (required), parent (required), screen (required), name, +2 more.

batchA

Atomically apply 1..100 add/update/move/remove ops. Later id/parent fields may use $N for a preceding add operation index. Props: every node accepts w=hug|fill|integer and h=hug|fill|integer. Containers are stack,layer,card,navbar,sidebar,modal,drawer,list,list_item,tabs and accept dir=v|h, gap, pad, align=start|center|end, justify=start|center|end|between, fill=none|faint|light|dark. A layer overlaps children; its direct children may use anchor=stretch|top_start|top|top_end|start|center|end|bottom_start|bottom|bottom_end. A drawer{title,side=left|right|bottom,open} is layer-only; list accepts only list_item children; tabs accept container panels; modal is overlay-only; sidebar is desktop-only. navbar{title,back}; modal{title,dismiss}; list{dividers}; list_item{title,subtitle,leading,trailing,to}; tabs{active}; text{text,variant=h1|h2|h3|body|caption|label,muted,align,to}; button{text,label,variant=primary|secondary|ghost|danger|fab,icon,pressed,to}; input{label,placeholder,value,kind=text|email|password|number|search,error}; textarea{label,placeholder,rows}; select/radio_group{label,options,value}; checkbox{label,checked}; toggle{label,on}; image{label,aspect=16:9|1:1|4:3}; icon{icon,size,to}; avatar{label,size}; badge{text,tone=neutral|success|warn|danger}; table{columns=string array,rows=0..100 integer placeholder-row count}. Icon names: menu,close,search,back,chevron_right,chevron_down,plus,minus,check,user,settings,home,bell,heart,star,trash,edit,filter,calendar,upload,download,more,cart,info,warning,compass,locate,play,stop. Example: {"screen":"checkout","ops":[{"op":"add","parent":"root","type":"stack","name":"form"},{"op":"add","parent":"$0","type":"input","name":"email","props":{"label":"Email"}}]}.

Inputs: ops (required), screen (required).

checkpointB

Persist a named snapshot of one screen (20 retained per screen). Example: {"screen":"checkout","label":"before_form_rework"}.

Inputs: label (required), screen (required).

create_documentB

Create and activate an empty document. name must match [a-z][a-z0-9_]{0,31}. Example: {"name":"checkout_redesign"}.

Inputs: name (required).

create_screenC

Create a screen. viewport is mobile/tablet/desktop or {width,height}. Example: {"name":"checkout","viewport":"mobile"}.

Inputs: name (required), viewport (required).

delete_screenB

Delete a screen; incoming links remain and lint as dead links. Example: {"name":"old_checkout"}.

Inputs: name (required).

diffB

Compare a checkpoint with another checkpoint or current (default). Example: {"screen":"checkout","from":"before_form_rework","to":"current"}.

Inputs: from (required), screen (required), to.

duplicate_screenB

Deep-copy a screen while preserving node ids. Example: {"source":"checkout","new_name":"checkout_error"}.

Inputs: source (required), new_name (required).

exportA

Export one screen or all screens to workspace/exports. format is png, svg, or html. Example: {"format":"html"}.

Inputs: format (required), screen.

get_treeB

Read a compact scene tree before editing. Lines are <id> <type> [prop=value, ...] w=<size> h=<size>; * means annotated. Example: {"screen":"checkout","depth":3}.

Inputs: screen (required), node, depth.

lintA

Run all deterministic layout, accessibility, label, link, and overlay rules—including touch target, small text, and clipped text checks—and return findings plus a marked PNG. Example: {"screen":"checkout"}.

Inputs: screen (required).

list_documentsB

List workspace documents in stable name order; the active document is marked. Input: {}. Example: {}.

Inputs: no named parameters.

list_screensB

List active-document screens with viewport, node count, and inbound-link count. Input: {}. Example: {}.

Inputs: no named parameters.

moveA

Reparent or reorder a node; index is zero-based and defaults to append. Example: {"screen":"checkout","id":"pay_btn","parent":"form","index":2}.

Inputs: id (required), parent (required), screen (required), index.

open_documentB

Open an existing workspace document and make it active. Example: {"name":"checkout_redesign"}.

Inputs: name (required).

redoB

Redo the last n undone session mutations on a screen. Example: {"screen":"checkout","n":1}.

Inputs: screen (required), n.

removeB

Remove a node and its subtree. root cannot be removed. Example: {"screen":"checkout","id":"old_note"}.

Inputs: id (required), screen (required).

renderC

Render a deterministic PNG. mode is clean, ids, or notes; scale is 1 or 2. Example: {"screen":"checkout","mode":"ids","scale":1}.

Inputs: screen (required), mode, scale.

render_flowC

Render the active document flow graph as a deterministic PNG. Input: {}. Example: {}.

Inputs: no named parameters.

undoA

Undo the last n session mutations on a screen; a batch is one mutation. Example: {"screen":"checkout","n":1}.

Inputs: screen (required), n.

updateA

Merge a prop patch; null deletes a key and annotation sets/removes the node annotation. Props: every node accepts w=hug|fill|integer and h=hug|fill|integer. Containers are stack,layer,card,navbar,sidebar,modal,drawer,list,list_item,tabs and accept dir=v|h, gap, pad, align=start|center|end, justify=start|center|end|between, fill=none|faint|light|dark. A layer overlaps children; its direct children may use anchor=stretch|top_start|top|top_end|start|center|end|bottom_start|bottom|bottom_end. A drawer{title,side=left|right|bottom,open} is layer-only; list accepts only list_item children; tabs accept container panels; modal is overlay-only; sidebar is desktop-only. navbar{title,back}; modal{title,dismiss}; list{dividers}; list_item{title,subtitle,leading,trailing,to}; tabs{active}; text{text,variant=h1|h2|h3|body|caption|label,muted,align,to}; button{text,label,variant=primary|secondary|ghost|danger|fab,icon,pressed,to}; input{label,placeholder,value,kind=text|email|password|number|search,error}; textarea{label,placeholder,rows}; select/radio_group{label,options,value}; checkbox{label,checked}; toggle{label,on}; image{label,aspect=16:9|1:1|4:3}; icon{icon,size,to}; avatar{label,size}; badge{text,tone=neutral|success|warn|danger}; table{columns=string array,rows=0..100 integer placeholder-row count}. Icon names: menu,close,search,back,chevron_right,chevron_down,plus,minus,check,user,settings,home,bell,heart,star,trash,edit,filter,calendar,upload,download,more,cart,info,warning,compass,locate,play,stop. Example: {"screen":"checkout","id":"pay_btn","props":{"variant":"primary","annotation":"Disabled until valid"}}.

Inputs: id (required), props (required), screen (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 22 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions: document lifecycle, screen lifecycle, node editing, rendering, history, and linting are well separated. There is some overlap between render/render_flow/export/lint and between individual node operations and batch, but the descriptions make the intended boundaries understandable.

    Naming Consistency3/5

    Several tools follow a clear verb_noun pattern (list_documents, create_screen, get_tree, render_flow), but many others are bare verbs or nouns (add, update, move, remove, batch, diff, undo, redo, links, checkpoint). The set remains readable, but the convention is mixed rather than predictable.

    Tool Count4/5

    At 22 tools the surface is slightly heavy, but the domain genuinely spans documents, screens, scene-tree editing, rendering, export, linting, and history. Each tool appears to earn its place rather than being redundant filler.

    Completeness3/5

    Core editing workflows are covered, including document/screen management, node CRUD, batch edits, rendering, export, linting, and undo/redo. However, there are notable gaps: no delete or rename for documents, no rename/update for screens, and checkpoints can be created but not listed or restored.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that enables AI coding agents to read and write to a local-first HTML/CSS design canvas, bridging visual design and code generation.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An intelligent MCP server for Google Stitch that generates production-ready UI from text prompts, with auto-orchestration of design systems, WCAG accessibility, responsive breakpoints, and framework conversion (React, Vue, Svelte).
      17
      18 npm
      9
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables LLMs to see and control a computer — screen capture, window management, mouse and keyboard automation — with a structured plan-execute workflow for complex desktop automation.
      GPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server that captures rendered UI, diagnoses design tells and consistency drift, and generates redesign diffs from natural language art direction, all within Cursor.
      2
      MIT