Remote Mode
Run the-brain on a Linux server, connect from macOS
Remote mode lets you run the-brain on a headless Linux server while using your Mac as a client.
Architecture
ββ Linux Server βββββββββββββββββββββββ
β the-brain daemon start β
β ββ API :9420 β Bearer mb_xxx β
β ββ MCP SSE :9422 β Bearer mb_xxx β
β ββ Storage: SQLite or LibSQL β
βββββββββββββββββββββββββββββββββββββββ
β² β²
β β
ββββββ΄βββββββ ββββββ΄βββββββββββ
β Agent β β MCP Client β
β (Mac) β β β
β Cursor β β Claude Desktopβ
β Claude CD β β Cursor, Zed β
β Windsurf β β β
β β push 60sβ β β SSE + auth β
βββββββββββββ βββββββββββββββββServer Setup
# On Linux server
the-brain init --remote
# β Generates auth token, sets bindAddress: 0.0.0.0
the-brain daemon start
# β API on 0.0.0.0:9420, MCP SSE on 0.0.0.0:9422
cat ~/.the-brain/config.json | grep authToken
# β Save this token!Client Setup
# On macOS
export THE_BRAIN_REMOTE_URL="http://<server-ip>:9420"
export THE_BRAIN_AUTH_TOKEN="mb_<token>"
# Start push agent (polls local IDE logs, pushes to server)
the-brain agent
# Or one-shot
the-brain agent --onceAuth
All endpoints except /api/health require:
Authorization: Bearer mb_<token>The agent automatically adds this header.
Storage Options
- SQLite (default): Local to server
- LibSQL (Turso): Shared across multiple servers
the-brain backend set --slot storage --backend libsql