Skip to content

remote: connect your brain in Claude on the web and phone (brain mcp --http, mcp-router, brain_capture) - #227

Merged
joedanz merged 14 commits into
mainfrom
feat/remote-mcp
Oct 6, 2026
Merged

joedanz merged 14 commits into
mainfrom
feat/remote-mcp

Conversation

@joedanz

@joedanz joedanz commented Oct 6, 2026

Copy link
Copy Markdown
Owner

What

Claude on the web and in the phone app can only reach a server over HTTPS. This lets each person connect their own brain to Claude: one connector address per company, everyone clicks Connect and signs in with their work email. Spec: docs/superpowers/specs/2026-10-06-remote-mcp-design.md (local, gitignored).

  • brain mcp --http serves one person's compiled vault on loopback. It answers only to a request signed for that person's email.
  • brain mcp-router routes each signed-in email to that person's process. It holds no vault.
  • brain_capture saves a note into the person's Inbox. Notes wait in a per-person spool and brain cycle --spool-root DIR files them through ingest_note.
  • remoteauth.py checks the signed identity (RS256 only, issuer/audience/expiry, key rotation) an identity edge such as Cloudflare Access attaches. brainkit runs no sign-in server.
  • Optional extra brainkit[remote] (PyJWT, floor >=2.10.1); base install and dependencies are unchanged.
  • Shipped deploy/brain-box/brain-mcp@.service and brain-mcp-router.service; brain-liveness.sh no longer reports systemd templates as down.
  • New guide docs/guides/remote-access.mdx, reference pages, changelog.

Why this shape

Proven by a live spike on Embark (2026-10-06): claude.ai connected through Cloudflare Access Managed OAuth and answered from a real brain. The tenant wall stays physical: every process that opens a vault opens exactly one, and a routing mistake is refused (wrong_person), never served.

Verification

  • Full suite on the final code: 1986 passed, 1 skipped. ruff clean. Docs site builds.
  • tests/test_remote_e2e.py runs the real router, two vault servers, a capture and a cycle drain in one process, including a deliberately wrong route.
  • Base install without the extra: brain mcp-router / brain mcp --http exit 2 naming brainkit[remote].
  • An Opus whole-branch review found one Critical (a lone surrogate in a capture crashed every cycle) and one Important (an unreadable spool failed silently); both fixed with failing-first tests, plus the pyjwt floor and five smaller edges.

Not in this PR

Fleet provisioning (hostnames, Access app, units, UI) is a separate plan in the fleet repo and needs brainkit 0.9.0. The release PR comes after merge. Deferred: HTTP status in request log lines.

https://claude.ai/code/session_0145uCzuUjLpe6rbH4WTf43Z

joedanz added 12 commits October 6, 2026 11:24
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
brainkit-docs Ready Ready Preview Oct 6, 2026 4:39pm UTC

Request Review

One authenticate_post for the router and the vault server, one
normalize_email (schemas), a default DrainReport in the cycle, a single
shared RSA key for the tests, one JSON-RPC builder, and no HMAC warning.

Claude-Session: https://claude.ai/code/session_0145uCzuUjLpe6rbH4WTf43Z
@joedanz
joedanz merged commit 4f90a3c into main Oct 6, 2026
7 checks passed
@joedanz joedanz mentioned this pull request Oct 6, 2026

This branch was successfully deployed

1 active deployment
Preview — eb689399 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant