Summary
mcp__gbrain__think returns {"answer": "(no LLM available — set ANTHROPIC_API_KEY or pass client)", "warnings": ["NO_ANTHROPIC_API_KEY"]} over the stdio MCP transport, even when the wrapping Claude Code session has full LLM capability. The "synthesis flagship" tool is non-functional for any MCP caller.
Environment
- gbrain 0.28.12
- macOS 26.5
- Engine: Postgres on Supabase
- Transport: stdio MCP via Claude Code
- ANTHROPIC_API_KEY: not set in user's shell (intentionally — Claude Code provides the LLM context)
Repro
The retrieval portion works (evidence is populated). The synthesis step is what breaks.
Impact
think is the documented multi-hop synthesis primitive ("cited answer with conflict + gap analysis"). It's the one tool that promises to do real reasoning over the corpus instead of just retrieval. Over MCP, it's a no-op.
- Agents fall back to manually pulling pages via
query and synthesizing in their own context — which is what they'd do without gbrain at all.
Hypotheses
This is the same ctx-not-threaded family as #713 (whoami unknown_transport). The MCP server doesn't get the calling Claude Code session's LLM credentials. Two design choices:
- Bring-your-own-key: gbrain MCP server reads
ANTHROPIC_API_KEY from its own env at startup (won't work for Claude Code MCP since the CC parent doesn't propagate it down)
- Per-call client: accept a
client_id / model arg from the MCP caller and route through it (cleaner but bigger contract)
Expected
Either:
- Document that
think requires ANTHROPIC_API_KEY to be set in gbrain server env (and the auto-launched stdio server picks it up from user's shell)
- Or accept a
model arg + route synthesis through whatever LLM the MCP caller designates
Actual
Silent degrade to "evidence-only" mode with a one-line warning that's easy to miss in a 50KB response.
Summary
mcp__gbrain__thinkreturns{"answer": "(no LLM available — set ANTHROPIC_API_KEY or pass client)", "warnings": ["NO_ANTHROPIC_API_KEY"]}over the stdio MCP transport, even when the wrapping Claude Code session has full LLM capability. The "synthesis flagship" tool is non-functional for any MCP caller.Environment
Repro
{"name":"think","arguments":{"question":"Why did we choose option A over option B for feature X?"}} // response { "answer": "(no LLM available — set ANTHROPIC_API_KEY or pass client)", "warnings": ["NO_ANTHROPIC_API_KEY"], "evidence": [ /* still returns relevant pages */ ] }The retrieval portion works (evidence is populated). The synthesis step is what breaks.
Impact
thinkis the documented multi-hop synthesis primitive ("cited answer with conflict + gap analysis"). It's the one tool that promises to do real reasoning over the corpus instead of just retrieval. Over MCP, it's a no-op.queryand synthesizing in their own context — which is what they'd do without gbrain at all.Hypotheses
This is the same
ctx-not-threaded family as #713 (whoamiunknown_transport). The MCP server doesn't get the calling Claude Code session's LLM credentials. Two design choices:ANTHROPIC_API_KEYfrom its own env at startup (won't work for Claude Code MCP since the CC parent doesn't propagate it down)client_id/modelarg from the MCP caller and route through it (cleaner but bigger contract)Expected
Either:
thinkrequiresANTHROPIC_API_KEYto be set in gbrain server env (and the auto-launched stdio server picks it up from user's shell)modelarg + route synthesis through whatever LLM the MCP caller designatesActual
Silent degrade to "evidence-only" mode with a one-line warning that's easy to miss in a 50KB response.