This is a hands-on tutorial. To keep it concrete, we follow two developers —
Tony (the host) and Peter (the buddy) — through
how their machines actually connect. Pick a path below; each one takes a different route to the same win.
// SELECT YOUR LEARNING PATH
Choose your path
NOW PLAYING · The Architect — end-to-end
↕ switch path
Chapter 1
The broker lives on Tony's machine
When Tony starts Sys-Buddy, the broker (the little server that coordinates everything) runs on his own computer at localhost:8787. "localhost" just means "this very machine."(8787 is just the default MCP port — the broker can run on any port Tony picks; the examples below use 8787.)
Here's the whole problem in one picture — localhost is useless to Peter, because on Peter's laptop, "localhost" means Peter's laptop:
TONY'S LAPTOPPETER'S LAPTOP
broker → localhost:8787 Peter types localhost:8787
✅ "that's me, here it is" ❌ reaches HIS OWN laptop,
not Tony's. Nothing there.
So Peter needs some address that leads to Tony's machine specifically. Everything else here is just "how does Peter get that address, and how does his request travel there."
Chapter 2
Address vs token: where vs who
This is the single most important idea, and it unlocks the rest. Two totally different jobs, done by two different things:
The address = WHERE
Like the street address on an envelope. It only says where the request is going — to Tony's broker. It says nothing about who sent it.
The token = WHO
Like a signed ID inside the envelope. Every request carries Authorization: Bearer <token> — that's what proves "this is Peter, on the frontend role."
When Peter pairs, his connect command literally spells out both halves:
claude mcp add --transport http sys-buddy \
http://100.101.102.103:8787/mcp \ ← WHERE (Tony's broker)
--header "Authorization: Bearer PETER_TOKEN" ← WHO (it's Peter)
Tony and Peter dial the same broker address, but each request is stamped with a different token — so the broker always knows who's who. A leaked address alone is harmless: no token → 401, door stays shut.
Chapter 3
How Peter's request actually travels
Peter's Claude agent makes the network call — same as if Peter typed curl in a terminal. Here's the key idea: Claude doesn't do the networking itself. It hands the request to the operating system and says "please deliver this." The OS decides the route.
So the real question is: does Peter's OS know a route to Tony's machine? For an ordinary public web address, yes — every machine already knows how to reach the public internet. For a private address, it only works if something has taught the OS that route:
Peter's Claude: "OS, connect me to Tony's broker"
│
▼
Peter's OS: "do I have a route to that address?"
│
┌────┴────────────────────────────────┐
│ public address (ngrok) → │
│ "sure — it's on the internet, │
│ I already know the way." ✅ │
├─────────────────────────────────────┤
│ private address + Tailscale on → │
│ "that's Tony's machine on our │
│ tailnet — routing it there." ✅ │
├─────────────────────────────────────┤
│ private address, no Tailscale → │
│ "no route. request dies here." ❌ │
└─────────────────────────────────────┘
The token proves who Peter is, but without a route his machine can't reach Tony at all — so he never even gets to show the token. Supplying that route is the whole job of the two paths: ngrok gives Tony a public address (nothing for Peter to install), while Tailscale builds a private network both machines join. That's the fork — pick either path from the roster to see it in full.
Tiny precision:100.101.102.103 is a raw number, so there's no DNS name-lookup for it — DNS only turns names like google.com into numbers. Either way it still goes through the OS's routing step — which is exactly where a private-network tool like Tailscale hooks in.
Chapter 4
Three addresses, one broker
Same broker every time; only the address out front changes depending on the road:
Same machinebuddy = host
http://localhost:8787/mcp
ngrokpublic tunnel
https://abc-123.ngrok-free.app/mcp
Tailscaleprivate network
https://your-machine.tailnet.ts.net/mcp
ngrok makes a public address — every machine already knows how to reach public addresses, so Peter installs nothing. Tailscale makes a private address that only works between machines running Tailscale. That's the whole trade-off.
Chapter 5
Two doors: act, and watch
The broker answers at two paths. Once Peter's machine can reach the address, any program on it — Claude and his web browser — can use both:
Peter's Claude → http://100.101.102.103:8787/mcp← the tool door (act)
Peter's browser → http://100.101.102.103:8787/ui?v=…← the dashboard (watch)└──────── same broker, same address ────────┘
Peter opens the dashboard in his browser at the same address. The ?v= viewer token proves he's allowed to watch (read-only). Address gets the browser there; token says what he may do.
Bonus
Is the invite link also the dashboard?
No — but redeeming it produces one. When Peter redeems the sb1_ invite, pairing hands back three things:
🔗 sb1_a91f…inviteone-time · burned on redeem
→redeem
⌨️
The claude mcp add … command
run in the terminal — wires Claude to the broker
📋
The role prompt
paste into the Claude session
📊
A personal dashboard link read-only<broker>/ui?v=<viewer-token>
🔗 sb1_… · the invite link
A one-time pass to pair. Used once, then burned. It can't do anything afterward.
…/ui?v=… · the dashboard link
A separate, reusable, read-only link with its own viewer token. Open it anytime to watch — but you can't act through it.
What each person ends up holding
Two kinds of credential: one to act (scoped, powerful) and one to watch (read-only).
Tony (host)
ACT
Own agent seat
An agent token scoped to {this task, the host's role}. Tony drives a role too — this is his seat at the table.
HAND
An invite link per other role
One sb1_ link for each role Tony isn't playing. Handed out to buddies, burned on redeem.
WATCH
Own dashboard link
A read-only …/ui?v=… link to watch the whole task progress live.
Peter (buddy)
ACT
Agent token
Scoped to {this task, Peter's role}. Can't touch other tasks or impersonate another role.
WATCH
Dashboard link
The read-only …/ui?v=… link produced at pairing. Watch anytime; act never.
Now pick a road →
NOW PLAYING · ngrok — the public tunnel
↕ switch path
The Quick Draw
ngrok, start to finish
The easy sibling — only Tony installs anything. ngrok is a small program Tony runs that creates a public web address and quietly forwards everything to his own localhost:8787. Peter needs nothing but the link.
1
Tony · starts ngrok in a terminal
Separate from the app. This says: give me a public https URL and forward anything that hits it to my local port 8787.
Into the Public URL field (leaving "Private network" OFF — ngrok is public, not a VPN), then clicks Create & start broker. Now the chain is live: public URL → ngrok → localhost:8787.
3
Tony · shares the invite link
The sb1_ link now embeds the ngrok URL as the broker address — an address that actually works from Peter's machine, unlike localhost.
4
Peter · joins — installs nothing
He pastes the link into Join and runs the command it gives him. His OS already knows how to reach public web addresses, so there's no "road" to set up.
Peter's Claude → ngrok's servers (over https) → Tony's ngrok program → Tony's broker. The public leg is TLS-encrypted, which is exactly why https is required — the token rides that leg and must never travel in cleartext.
Peter's OS already knows how to reach a public ngrok-free.app address — that's why he installs nothing. The whole "road" is the public internet.
Tony's worry
"A public URL now points at my machine — didn't I just expose myself to the whole internet?"
The reality
A URL is not access. The address is only where; a valid token is who. Anyone who finds the URL and knocks without a token gets a flat 401.
On top of that: https is enforced on the public leg, invites are single-use and expire in 15 min, tokens are scoped and auto-expire, pairing is rate-limited, everything is audit-logged, and closing the task revokes it all at once. See the full security list →
Try another →
NOW PLAYING · Tailscale — the private network
↕ switch path
The Ghost
Why do both people need Tailscale?
Because Tailscale isn't a link you share — it's a private network you join. That one fact is the whole difference from ngrok. Two ways to let someone reach your house:
🏠
ngrok = a public street address+ a locked door
A public address anyone can walk up to. Peter needs nothing installed — just the address (link) and the key (token).
✓ one-sided · only the host sets it up
🏘️
Tailscale = a gated communityoutsiders can't reach it at all
The broker lives inside a private network outsiders can't reach. To walk up to the door, Peter must become a resident first — install Tailscale and join. You can't mail someone the inside of a private network.
⚑ two-sided · both install & join
So the 100.x.y.z address in the link only means something to a machine that's also on the tailnet. That's why both need it.
Step by step
Tailscale, start to finish
1
Both · install Tailscale & log in
The step ngrok never had. Both machines join the same private network (a "tailnet"), each reachable by the other but invisible to the public internet.
2
Tony · runs tailscale serve
This publishes the broker on the tailnet at an https …ts.net address with a real TLS certificate — no raw IPs, no plain http.
Every call rides the WireGuard-encrypted tailnet straight to the broker. No public internet, no third-party servers in the middle — often a direct peer-to-peer link.
The reward for the extra install: no public URL, no third-party servers in the middle — often a direct, WireGuard-encrypted peer-to-peer link between the two machines. Maximum privacy.
-Free tier hands out a new random URL each restart
-Traffic transits a third party (ngrok's servers)
VS
🥷
TAILSCALE
Private Network · The Ghost
+Nothing is ever exposed to the public internet
+Direct, WireGuard-encrypted peer-to-peer link
+Stable private IP that doesn't change with networks
+Perfect if you're already on a company tailnet
-Both people must install Tailscale & log in
-Two invites to manage: tailnet + sys-buddy
-More moving parts to explain to a new buddy
-Overkill for a quick one-off pairing
The verdict
Pick ngrok to pair in about 60 seconds with zero setup on the buddy's side — the tokens keep the public URL safe. Pick Tailscale when privacy is paramount, nothing may touch the public internet, or you're both already on a company tailnet. Same broker, same result either way.
Both are free to start. Tailscale's Personal plan is free for non-commercial use (up to 6 users, unlimited devices), and ngrok's free tier works fine too — it just hands you a fresh random URL on each restart.
Read one in full →
You reached the end
// FINISH HIM — er, the setup
Flawless Learning
You now know how two machines find each other, prove who they are, and watch it happen. Go ship something with a buddy.