n8vDocs

Device mesh

Your Macs running Claude Code and your n8v chats message each other, so work that only one machine can do (the iOS simulator on the Mac Mini) stays in step with the rest

Some work only one machine can do. The iOS simulator runs on your Mac Mini; an n8v chat in its agent environment cannot run it. With the device mesh, the chat asks the Claude Code session on the Mac Mini to check out a branch and run the tests, and the result comes back into the chat. A session on your MacBook Air can do the same.

The device mesh is off until it is turned on for your account (feature flag deviceMesh). Then Settings → Devices appears. It reaches only your own Macs and your own chats.

  1. n8v chat

    MessageDevice to Mac Mini: check out feat/ios-share at 3f2c1ab and run xcodebuild test on the iPhone 17 simulator; reply with the counts.

  2. n8v relay

    Takes it from your own chat only, logs it, keeps it for the Mac Mini.

  3. Mac Mini session

    Gets it within seconds. Set to ask first, it shows you the request; then it checks out the branch and runs the tests.

  4. Mac Mini session

    reply: 214 passed, 0 failed.

  5. n8v chat

    Wakes with the answer as a device message, and carries on.

The chat does not wait in its turn: the answer wakes it when it comes, minutes later if the tests take minutes.

How it is built

The Mac side is a Claude Code channel: an MCP server, started by Claude Code over stdio, that pushes events into a running session and carries replies back. It is documented by Anthropic in the channels reference; n8v uses that contract and nothing else of Claude Code's internals.

  1. Claude Code session

    On the Mac, started with mesh claude

    Gets each message as a <channel> event, works with its own permission mode, answers with the reply tool.

  2. Mesh channel

    On the Mac: the plugin mesh@n8v-mesh, over stdio

    Asks n8v for messages to this session and pushes them in. Signs every request with the Mac's own key. Declares no permission relay.

  3. n8v relay

    n8v, over HTTPS

    Checks the signature, the sender and your limits, keeps each message for 24 hours, logs every send and delivery.

  4. Your n8v chat, or another Mac

    MessageDevice in a chat, message_device in Claude Code

    Sends the instruction; the answer comes back into the chat, which wakes for it, or into the sending session.

No port opens on any Mac: the channel only calls out to n8v. Each layer can stop a message: pause or remove a device in Settings, Devices, or run mesh stop on the Mac.

Add a Mac

Make a line in n8v. In Settings → Devices, name the Mac and choose Add a Mac. n8v asks for your second factor, then shows one line, good once for 15 minutes.

Paste it into Claude Code on that Mac. It starts with !, so Claude Code runs it in its shell:

! curl -fsSL https://n8v.online/api/mesh/install | sh -s -- K7Q4-MZP2-X9AB "Mac Mini"

It needs Node.js 18 or later. It writes the channel to ~/.n8v/mesh, makes the Mac its own Ed25519 key (the private half stays in ~/.n8v/mesh/device.key, readable by you only, like an SSH key), pairs the Mac, and installs the Claude Code plugin mesh@n8v-mesh from a local marketplace.

Start sessions that take messages with mesh claude. See the next section: this is your choice to make.

What you run on each Mac, and the flag it needs

While channels are in research preview, Claude Code loads only channels on Anthropic's allowlist with --channels. A channel you build yourself, as n8v's is, loads with --dangerously-load-development-channels. mesh claude runs exactly this:

N8V_MESH_CHANNEL=1 N8V_MESH_PID=$$ claude --dangerously-load-development-channels plugin:mesh@n8v-mesh

What the flag does. It lets Claude Code load that one named plugin as a channel although it is not on the allowlist. It skips the allowlist only: your organization's channelsEnabled policy still applies, and nothing else about the session changes. Claude Code shows a warning each time it starts and asks you to confirm that you use it for development. Anthropic's advice is not to use it for channels from sources you do not trust; this one comes from your own n8v account, and its whole source is the file ~/.n8v/mesh/channel.mjs on the Mac.

Your choice, on each Mac.

You startThe session
~/.n8v/mesh/bin/mesh claudeTakes messages: they arrive within seconds while it is open. You confirm the development channel once per start. A claude you run from inside it only sends.
claudeSends only: list_devices, message_device and reply work, nothing arrives. No warning, nothing changes.

On the Mac Mini that runs the simulator, start the session you want n8v to reach with mesh claude, for example in a terminal you leave open. Events arrive only while the session is open. Add an alias if you like (alias claude-mesh=~/.n8v/mesh/bin/mesh\ claude); n8v does not change your shell files.

Team and Enterprise organizations must turn channels on first (channelsEnabled). Pro, Max and Ultra accounts without an organization need nothing more.

What each side can do

WhereToolWhat it does
An n8v chatListDevicesYour Macs: online, paused, set to ask first, and the sessions that take messages (the folder each works in).
An n8v chatMessageDeviceSends an instruction to a Mac, up to 8,000 characters. The answer arrives in the chat as an <n8v-device-message> and wakes the chat. replyTo answers one.
Claude Code on a MacreplyAnswers a message it received, back to the chat or session that sent it.
Claude Code on a Macmessage_deviceSends to a session on another of your Macs; the answer arrives as an event.
Claude Code on a Maclist_devicesThe same list as ListDevices.
An app, over n8v's MCPlist_devices, read_device_messagesRead the devices and every conversation, with what was delivered or expired.
An app, over n8v's MCPmessage_device, set_deviceSend, pause or resume, set ask or auto. Sending, resuming and changing ask or auto need an app you signed in to (OAuth); an API key may only pause.

The device tools appear in an n8v chat only when the chat takes part in peer messaging and you started it yourself.

Safety

  • Only you send. A message comes from a Mac you paired, from a chat you started, or from an app you signed in to. A chat that something outside started (the API, a mention, a webhook, an automation, Telegram, an organization) gets no device tools, nor does a chat of yours once outside text reaches it (an API key, a GitHub mention, another agent, Telegram). An API key cannot send. Only the Mac or chat a message went to can answer it.
  • What stays possible. A chat's agent also reads outside text through its own work: pull request comments, web pages, logs. That text could steer what it asks a Mac. This is why the Mac stays the boundary: its session keeps its own permissions, and Ask first is the default.
  • Every request is signed. The Mac signs each request with its own key, over the method, path, time, a single-use nonce and the body. n8v refuses a changed request, one older or newer than five minutes, and any nonce it has seen. A pairing code alone pairs nothing: the request that uses it must be signed by the key it binds.
  • Your permissions stay yours. Each Mac session keeps its own permission mode. The channel does not declare Claude Code's permission relay, so no message, and no chat, can approve a permission prompt on a Mac: only you can, at that Mac. A message arrives as a teammate's request, never as your words.
  • Ask first, by default. A device set to Ask first shows you each request before acting. Act on requests lets the session go ahead when it fits its work; choosing it, or turning a paused device back on, asks for your second factor.
  • Stops at every level. Pause a device or Pause all in Settings, Devices (also set_device over MCP): what waited for it is dropped, so nothing runs when you resume. Remove a device to cut it off at once. On the Mac, ~/.n8v/mesh/bin/mesh stop silences it until mesh start.
  • Everything is logged. Pairing, every send, every delivery, every list and every setting change appears in Settings → API → Activity, with the device or chat that acted. The words of a message are not kept in the log.

Limits: 12 replies in one conversation, 60 messages an hour per device, 300 per account. A message no session takes within 24 hours expires.

Works today, no build needed: text a session from your phone

Anthropic's own channels let you text a Claude Code session on your Mac. You set this up yourself; n8v plays no part in it. From Anthropic's channel docs:

iMessage (macOS, no bot or token):

  1. In Claude Code, run /plugin install imessage@claude-plugins-official, and choose the user scope. If the marketplace is missing, run /plugin marketplace add anthropics/claude-plugins-official first.
  2. Exit and start claude --channels plugin:imessage@claude-plugins-official.
  3. When macOS asks, give your terminal Full Disk Access (or add it in System Settings → Privacy & Security → Full Disk Access).
  4. Text yourself from any device on your Apple ID. Texting yourself passes the sender check by default. The first reply asks to let your terminal control Messages: choose OK.
  5. Other contacts reach the session only after /imessage:access allow +31612345678.

Telegram (any platform, needs Bun):

  1. In Telegram, message @BotFather, send /newbot, and copy the token.
  2. In Claude Code, run /plugin install telegram@claude-plugins-official (user scope), then /telegram:configure <token>.
  3. Exit and start claude --channels plugin:telegram@claude-plugins-official.
  4. Message your bot; it answers with a pairing code. In Claude Code run /telegram:access pair <code>, then /telegram:access policy allowlist so only you can send.

Both are on Anthropic's allowlist, so they need no development flag.

Remove a Mac

In Settings → Devices, remove it: it is cut off at once. On the Mac, ~/.n8v/mesh/bin/mesh uninstall removes the plugin and everything in ~/.n8v/mesh.