I replaced myself as the copy-paste courier between a cloud agent and my Mac — with 9 MCP tools
This is the hands-on version of a longer story I wrote on my blog, Muse Is in the Cloud, My Code Is on My Mac. That one is about how the workflow feels. This one is the setup, the rules, and what broke.
The problem: my agent lives in the cloud, my work doesn't
My personal agent (Muse) runs on a small cloud VM. My code, my files, and a pile of already-signed-in local apps live on a Mac with 64 GB of RAM. The agent can't reach any of it.
So I became the transport layer. Talk the task through in the cloud, copy the instructions, switch to a local coding session (Pi or Claude Code), paste, wait, copy the result, switch back, paste for review.
That works for one task. At three parallel projects it falls apart: which session runs which project, which one is waiting on me, whose output is whose — all of it lived in my head. Paste into the wrong session once and everything downstream is quietly wrong.
The fix was to give the cloud agent an MCP server that does the courier job: dispatch the task to the Mac, track the session, fetch the result, report back. I stopped carrying messages. Here's the setup, exactly as it runs.
The setup
Three pieces:
- Agent Bridge on the Mac — hosts local agent sessions (Pi, Claude Code, and a Codex app-server engine) behind an end-to-end encrypted relay. The Mac only dials out; nothing opens a port.
- An MCP server on the cloud side — stdio, published on npm as
@craftstead/agent-bridge-mcp, listed on the Official MCP Registry asio.github.gowinder/agent-bridge. - A listener — a second paired connection that watches sessions and wakes the cloud agent when something finishes or asks a question. (Why it polls, below.)
The MCP config is the boring standard shape:
{ "mcpServers": { "agent-bridge": { "command": "npx", "args": ["-y", "@craftstead/agent-bridge-mcp"] } } } Pairing happens once against the Bridge app on the Mac — the step-by-step guide walks through it, and the repo README is written so you can hand the install to your own agent.
The server exposes 9 tools. The whole workflow is basically five of them:
| Tool | What it does in the loop |
|---|---|
session_open | Get-or-create a hosted session on the Mac |
session_send | Send the task (a full spec, not a one-liner) |
session_read | Read back what the local agent produced |
session_wait / session_list | Check state without guessing |
session_archive | Close out a session that has no next round |
Rule 1: get-or-create, never pile up sessions
My one hard request: don't keep opening new conversations.
By round three on a project, a fresh local session has forgotten rounds one and two, and re-feeding context is miserable. So sessions are keyed by engine + working directory + purpose. Reuse the match; create only when the directory changed, I explicitly asked, or the old session is archived/gone — and when it creates one, it says why.
Sessions get titled MCP · P011 · Email Sending Setup — project number right after "MCP", so a human scanning the list knows what each one is.
One config trap worth copying: pass every parameter explicitly at creation — engine, model, thinking level, subagent model. Bridge remembers the parameters of the last manually created session; if you don't pass yours, whatever you last clicked by hand silently leaks into automated sessions, and when something misbehaves you can't tell whose settings did it.
Rule 2: questions get forwarded verbatim
When a local agent stops mid-task to ask "option A or B?", the question comes to me word for word, I answer item by item, and my answers go back as-is.
No summarizing — summaries lose things. And definitely no pre-filling an answer on my behalf. That's not help, that's deciding in my place. The same line shows up at the end of the pipeline: the local agent finishing a job doesn't ship it. Results come back to me; approval and verification are separate steps, deliberately.
The embarrassing part: notifications are polling
Bridge has no subscribe API. We tried — session.subscribe comes back unsupported.
So the listener polls every 15 seconds over the sessions it's watching. "Finished" needs two signals together:
- the session flipped from busy to idle, and
- its message count grew since dispatch.
Idle alone proves nothing (maybe it never started). Growth alone proves nothing either. A separate needsDecision flag catches the mid-task questions and forwards them immediately.
That's also why the listener is its own permanently-connected device: the dispatch side connects, speaks, and disconnects per call — and a listener that disconnects is just deaf. Fifteen seconds means notifications land ten-odd seconds late. Nothing I dispatch returns in under a few minutes anyway, so I don't care.
Incident 1: the session that "died" for two hours
A hosted session vanished from the MCP session list mid-task. I assumed it had died. It hadn't.
After an Agent Bridge update, the app had touched some protected macOS folders, a system permission dialog had appeared, and the local process sat blocked behind that modal — alive, unable to move, and completely invisible through the MCP layer. (A later round pinned a similar stall on a Little Snitch firewall prompt. Same shape: a local dialog, a frozen agent.)
Rules that came out of it:
- A long task with no progress for ~30 minutes is a zombie until proven otherwise — check for a local system prompt before inventing gateway theories.
- Absence from the session list is not a death certificate. Someone has to look at the process list on the Mac itself.
- Only archive sessions that are confirmed finished, with output already harvested and verified. Never archive on list-absence alone.
Incident 2: 173 passing tests, and I killed the result anyway
A game-art correction round came back with beautiful stats: 173 tests passing, typecheck clean, every asset registered. By any "green means go" standard, it was done.
Then I opened the images. The ship sprites had been drawn almost side-on, and no programmatic rotation fakes the diagonal, deck-visible pose of the locked key visual. The port layout was wrong at the root, too.
The numbers hadn't lied — everything they checked was true. They just couldn't check the thing that mattered. That's the actual division of labor in this setup now: the cloud agent writes specs, dispatches, verifies what's verifiable, and the last gate is still a human looking at the result.
What it costs, roughly
This wasn't built to save tokens, but the account is visible after a few weeks:
- The coding loop is the expensive part — read, edit, test, error, edit again, dozens of rounds with a growing context. All of that now runs on the local agent, on my own gateway. The cloud side spends a handful of rounds on the spec, the read-back, and the review. Its budget goes to judgment, not typing.
- The hardware was already here. Big builds and parallel sessions run on a 64 GB Mac instead of a small cloud VM that would lose on memory before it lost on anything else.
- Some work simply can't move. Files, sign-in state, and local apps exist only on the Mac. For that class of task this isn't a convenience — it's the only road.
Try it
Agent Bridge is open source and free:
- Site: agent-bridge.craftstead.app
- Code: github.com/gowinder/agent-bridge (the MCP server lives in
apps/mcp) - npm:
@craftstead/agent-bridge-mcp· Registry:io.github.gowinder/agent-bridge· Glama listing
The Mac still only dials out; nothing in this setup opens a port on your machine.