Repro:
gbrain serve (stdio MCP server, no flags)
- From MCP client (Claude Code), call
mcp__gbrain__whoami
Expected: {transport: "local", scopes: []}
Actual:
{
"error": "unknown_transport",
"message": "whoami called over a remote transport that did not thread ctx.auth. This is a transport bug — every remote call site must populate ctx.auth or set ctx.remote === false."
}
Other tools work fine over the same stdio transport — find_orphans, takes_list, sources_list, get_stats, list_pages all return correct responses. Only whoami mis-detects the transport.
Likely cause (from quick grep on src/mcp/server.ts):
- Line 36 sets
remote: true (HTTP server context)
- Line 58 sets
remote: false (stdio context)
The whoami handler probably checks ctx.remote === true first and bails into the unknown_transport branch before reaching the local-shape return — OR the stdio entry point doesn't actually reach line 58 in some code path.
Environment: gbrain v0.28.6 (commit b325f28) / Bun 1.3.13 / Linux (Ubuntu 22.04, Vertex AI ADC fork) + Windows 11 client. Both clients exhibit the same error over their respective stdio MCP server.
Happy to PR a fix if you confirm the diagnosis direction.
Repro:
gbrain serve(stdio MCP server, no flags)mcp__gbrain__whoamiExpected:
{transport: "local", scopes: []}Actual:
Other tools work fine over the same stdio transport —
find_orphans,takes_list,sources_list,get_stats,list_pagesall return correct responses. Onlywhoamimis-detects the transport.Likely cause (from quick grep on
src/mcp/server.ts):remote: true(HTTP server context)remote: false(stdio context)The
whoamihandler probably checksctx.remote === truefirst and bails into the unknown_transport branch before reaching the local-shape return — OR the stdio entry point doesn't actually reach line 58 in some code path.Environment: gbrain v0.28.6 (commit b325f28) / Bun 1.3.13 / Linux (Ubuntu 22.04, Vertex AI ADC fork) + Windows 11 client. Both clients exhibit the same error over their respective stdio MCP server.
Happy to PR a fix if you confirm the diagnosis direction.