r/coolgithubprojects • • 22m ago

Kelpie: open-source browser that turns the phones you own into a device lab for agents. A phone trusts your laptop by its Ed25519 key, not its IP

We make Kelpie, an open-source (Apache-2.0) browser for iPhone, iPad, Android, macOS, Windows and Linux. You can just browse with it, but the app also has an HTTP/MCP control server built in, so a script or an agent can drive the phones and tablets you already have like a small device lab.

Repo: https://github.com/UnlikeOtherAI/kelpie

This post is about one part that took longer than expected: if a browser on your phone accepts commands from the network, how does it decide which computer is allowed to send them?

What we didn't want: trusting an IP, an mDNS name or a client id. Those change all the time (DHCP, new port, renamed laptop), and anyone on the same Wi-Fi can claim them.

How it works now (docs/api/computer-pairing.md in the repo):

  • Each computer has its own Ed25519 key. The CLI keeps it in ~/.kelpie/computer-key.pem (directory 0700, file 0600). A damaged key is an error, it is never silently replaced.
  • The computer posts its public key to /v1/pair and gets back a random requestId. Nothing is shown on the device at this stage, so unproven requests can't spam the screen with prompts.
  • The computer signs kelpie-computer-pair-v1\n<requestId>\n<publicKey> and sends it back. Expired, reused, wrong-key or wrong-source proofs are rejected.
  • Only then does the device ask "No / Allow computer". The name in the prompt is self-reported; the verified key is the identity and the IP is only context.
  • On approval the token is handed out once and sent as a Bearer header on later API and MCP requests.
  • A new IP, port, mDNS name or a browser restart doesn't prompt again: the CLI signs a fresh challenge with the same key. Denying a key blocks it for 10 minutes. Revoking it in Settings removes the key and all its tokens, and a different machine that later gets the old IP gets nothing.
  • Localhost is allowed implicitly, but based on the real socket peer. Forwarded headers, Host and client names never count, and requests with a browser Origin, cross-site fetches and non-JSON POSTs are rejected before that check.
  • Unproven challenges expire after 5 minutes, and the queue is capped at 32 requests per source and 256 in total.

Trying it

  1. Install the browser on each device from https://kelpie.rocks or the GitHub releases. The iOS app is on its way to the App Store; until then it's built from source.
  2. Optional: the helper CLI on your computer (Node 20+). npm install -g @unlikeotherai/kelpie, then kelpie discover finds browsers on your network over mDNS. It only finds and pairs with browsers, it doesn't install them.
  3. Run a command against a device, for example kelpie --device "<id>" navigate https://example.com. The first time, the device asks you to allow the computer. For an agent, point your MCP client at kelpie mcp.

Images: the first one is a generated illustration, not a screenshot. The others are real: the device wall from kelpie.rocks, then Kelpie on iPad and on Android.

What we'd like feedback on: does "approve a key once" feel right for a control API on your LAN, or would you rather type a short code or scan a QR every time? And if you like poking at handshakes, we'd like to hear what you'd attack first.

1 Upvotes

0 comments sorted by