[recipes] Add local-brain-no-mcp recipe + ob1-local-http skill#304
[recipes] Add local-brain-no-mcp recipe + ob1-local-http skill#304dhanjit wants to merge 1 commit into
Conversation
Self-hosted Open Brain stack designed for office networks that block both third-party cloud services and Claude Code's MCP feature. Deploys the official supabase/supabase docker stack on one LAN host alongside an Ollama sidecar; dev hosts capture and search thoughts via curl through a companion skill, with no MCP transport involved. - recipes/local-brain-no-mcp/: docker-compose overlay (uses Compose 'include' to merge with the official Supabase stack), setup.sh that clones supabase, generates HS256 JWTs via Python stdlib only, symlinks Edge Functions and installs SQL init scripts. Three Edge Functions (capture, search, list) embed server-side via Ollama; thoughts schema mirrors the canonical OB1 shape with a configurable EMBED_DIM (default 768, one-way-door per volume). - skills/ob1-local-http/: SKILL.md instructs Claude Code to translate capture/search/browse intents into authenticated curl calls against $BRAIN_URL using $BRAIN_ANON_KEY. Pure HTTP, no MCP. Documented as a deliberate exception to CLAUDE.md's "MCP must be remote Edge Functions" rule -- the rule exists for environments where MCP is available; this recipe targets ones where it isn't. Validations passed locally without a docker daemon: - shell syntax (bash -n), JSON syntax + schema, YAML syntax - tsc --noEmit clean on all Edge Function TypeScript - JWT generator produces verifiable HS256 tokens - psql variable substitution renders vector(768) correctly - gate rules 9, 10, 14 self-checks all pass Full end-to-end smoke test (docker compose up + capture + search) deferred to first run on the target office host -- sandbox has no docker daemon. https://claude.ai/code/session_011MriKPoc9f2XP6drqtdaBg
|
Thanks for the contribution. This is a substantial, well-organized recipe — 16 files all under new paths ( One thing for the maintainer, more positioning than code: this offers a deliberately no-MCP, local-HTTP architecture, which diverges from OB1's stated "one database, one MCP protocol" thesis. — Alan (community reviewer; non-binding) |
Summary
Adds a new recipe, local-brain-no-mcp, and its companion skill ob1-local-http — a self-hosted Open Brain for environments that can't use the canonical cloud + MCP setup.
All 16 files land under new paths only (
recipes/local-brain-no-mcp/,skills/ob1-local-http/). No existing OB1 file is touched — zero risk to current functionality.What it is
A single-LAN-host Open Brain:
pgvectorwith athoughtstable that mirrors the canonical OB1 schema exactly, plusmatch_thoughts()/upsert_thought()RPCs with the same signatures as cloudPOST /capture,POST /search,GET /listob1-local-httpskill, which lets Claude Code (or any skill-aware tool) capture/search against the local brain over plain HTTPS withcurlWhy — and a deliberate divergence to flag for review
This recipe is intentionally for constrained environments:
Because of constraint #2, the recipe deliberately diverges from
CLAUDE.md's rule that "MCP servers must be remote Supabase Edge Functions": it still uses Edge Functions, but exposes them as plain HTTPS endpoints rather than over MCP, since the network won't pass MCP. The recipe's README calls this out explicitly and tells users with no such constraints to use canonical cloud OB1 instead. Flagging it here so the divergence is a conscious review decision, not a surprise.Scope
metadata.jsonv0.1.0, difficultyadvanced, ~45 min setupmetadata.jsonv0.1.0, difficultybeginner, ~5 min.env.exampleprovided; setup generates keys locally viaopensslTest plan
recipes/local-brain-no-mcp/setup.shbrings up the stack (Docker 24+ / Compose v2.20+)POST /functions/v1/capturestores a thought;POST /functions/v1/searchreturns it by similarity;GET /functions/v1/listshows recentshttp://<brain-host>:3000ob1-local-httpskill captures + searches viacurlagainstBRAIN_URLNotes
Submitted as v0.1.0 — happy to iterate on placement, naming, or the MCP-divergence framing per maintainer preference.