1NX

Why is Claude Code great at diagram v1 and awful at nuking 20 minutes of manual cleanup by v3?

Asking an LLM to regenerate Mermaid when adding one dead-letter retry branch wipes every manual alignment tweak you made. 1NX's 16-tool MCP workflow makes agents read bounding coordinates and element versions first, patch only target IDs, refuse to touch dragged/edited shapes, inspect rendered PNGs, and undo as a single step.

PNG Collision Self-Check + Single Undo

Visual Verification

set_viewport · export_canvas_png · Cmd/Ctrl+Z

After updating a branch or converting Mermaid to native shapes, the agent calls set_viewport + export_canvas_png to spot clipped text itself—and one Cmd/Ctrl + Z reverts the whole AI batch.

Zero-Install Relay or Pure Local Loopback

Two Transports

In-memory relay (zero disk logs) · ws://127.0.0.1:8788/bridge

Use the zero-install remote relay (forwards tool calls strictly in RAM with no disk logs) for quick pairing, or flip to Local Mode so internal diagrams never leave localhost.

Claude Code, Codex CLI & Local Bridge Config

No daemon installation required. Open "Connect External AI..." in the canvas menu to grab a live session pairing URL.

Claude Code CLI one-liner

Run in your terminal using the pairing URL from your active canvas tab.

claude mcp add --transport http whiteboard "<pairing-url>"

Codex CLI / Desktop snippet

Add to ~/.codex/config.toml so Codex CLI, Desktop, and IDE sessions see the whiteboard tools.

[mcp_servers.whiteboard]
url = "<pairing-url>"

Pure localhost loopback mode

Switch the connection dialog to Local Mode so sensitive architecture traffic never leaves localhost.

ws://127.0.0.1:8788/bridge
# Bearer Token is issued per local bridge session

Connect Claude Code or Codex to Your Canvas in 5 Safe Steps

Keep your agent disciplined—read current coordinates, scope changes to a single frame, verify via screenshot, then save locally.

  1. Open 1NX on the target board tab

    Open https://1nx.net/ with zero mandatory login (or load a local .1nx / .excalidraw file) and keep the target tab open.

  2. Start pairing via Connect External AI

    Choose either the zero-install memory-only relay or Local Mode to generate session credentials; external tools have zero access until paired.

  3. Register the MCP server in Claude Code or Codex

    Run `claude mcp add --transport http whiteboard "<pairing-url>"` or add the URL to Codex config, then verify the 16 tools appear.

  4. Instruct the agent to read before editing

    Always ask the agent to run `get_canvas` first to confirm target frame bounds, version tags, and empty whitespace before writing.

  5. Verify rendered PNG and save your .1nx file

    Have the model run `set_viewport` + `export_canvas_png` to catch clipped labels, make final manual nudges, and save a local .1nx file.

3 Copy-Paste Anti-Drift Prompts for Engineering Sessions

Scoping target frames + requiring a final PNG check eliminates most accidental full-board rewrites.

1. Add only a retry / dead-letter branch after API changes

Keeps the agent from shifting shapes you already lined up on the left.

Call get_canvas first. Only add the dead-letter retry branch inside Frame "Payment Flow" and open space to its right. Do not move or restyle existing nodes. End with export_canvas_png to verify zero label overlaps.

2. Map real code flow into native shapes instead of images

Explicitly requests native editable shapes, bound connectors, and one undo batch.

Read this folder's webhook handler, then map the retry & idempotency sequence using native editable boxes and bound arrows in an empty frame on the right. Do not drop a static screenshot.

3. Turn HTML/design snippets into editable frame elements

Lets engineers and PMs drag widgets and adjust copy before reviews.

Import this HTML wireframe snippet into native editable canvas shapes and tables inside Frame "Checkout v2" via MCP, then call set_viewport + export_canvas_png to confirm text spacing.

Explicit Security & Access Boundaries

  • add_image intentionally accepts base64 only (<= 6 MB) `add_image` rejects arbitrary remote URLs so prompt injection cannot trick a local canvas bridge into fetching internal network endpoints.
  • Closing the tab or clicking Disconnect ends access immediately Pairing credentials bind to the open browser session only; the remote relay routes calls in memory without disk storage or request logs.

Claude Code & MCP Workflow FAQ

Why use an editable whiteboard over plain Mermaid text in Markdown?

Mermaid works fine for draft #1. Once you rearrange boxes by hand for readability, mix UI wireframes with notes, or annotate swimlanes, Mermaid source can no longer preserve manual positions. 1NX turns Mermaid into editable shapes and keeps manual positioning safe during later MCP edits.

How quickly can I undo if AI moves or overlaps elements unexpectedly?

1NX folds each batch of MCP edits into one history entry. A single Cmd/Ctrl + Z on the canvas cleanly rolls back the entire AI step.

Should I use the remote relay or Local Mode for private internal codebases?

For sensitive internal systems, toggle Local Mode (`ws://127.0.0.1:8788/bridge`) so canvas bridge payloads never cross a public relay—while still keeping in mind the data policy of whichever external LLM provider you prompt.

Where can agents discover all 16 tools and full schemas automatically?

Our machine-readable MCP Server Card is served at `https://1nx.net/.well-known/mcp.json`, and full parameter details live on the main MCP Guide page.