gbrain's recommended setup for local agents on a Postgres brain is one
resident `gbrain serve --http` on loopback, registered as an http MCP
entry. gstack classified every http entry as a remote brain, so memory
ingest staged transcripts for a brain admin's pull that never comes.
- lib/gbrain-mcp-locality.ts: one rule. An http/url/sse entry is local
when its URL is http(s) on a loopback host and the local gbrain config
has an engine and no remote_mcp marker. A URL with userinfo or ${ is
never local.
- gstack-memory-ingest: the loopback case takes the gbrain import path,
and entries left staged/remote-http import on the next local run.
- gstack-gbrain-detect: all three tiers use the rule; tier 2 classifies
the whole URL token of the claude mcp list line.
- gbrain-local-status: hasRemoteOnlyGbrainMcp uses the same classifier.
- gstack-skill-start: the jq hot path carries a conservative subset.
- USING_GBRAIN_WITH_GSTACK.md: a loopback serve over this machine's
engine is not Path 4.
Ported from #3552 onto current main.
Co-authored-by: Willy Morin <3635875+wmorin@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>