Skip to content

Commit 80d0726

Browse files
committed
brainkb skill: clarify connectivity (local MCP + localhost; no curl from sandbox)
localhost:8010 is reachable only from the machine running the Docker stack, via a locally-running MCP (stdio). A cloud/sandbox session can't reach a local deployment; on connection errors, don't guess URLs — check the local MCP/stack.
1 parent b5e4efb commit 80d0726

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

brainkb_skills/SKILL.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ Help the user ingest and explore a BrainKB knowledge base through the
1616
`query_service` API. Prefer the **`brainkb` MCP tools** if they are available
1717
(server at `brainkb_mcp/`); otherwise fall back to `curl` (see bottom).
1818

19+
## Connectivity — READ FIRST
20+
21+
The base URL must be reachable **from wherever this code runs**:
22+
23+
- `http://localhost:8010` (the current default) only works when the caller runs
24+
on the **same machine** as the BrainKB Docker stack. That means the **`brainkb`
25+
MCP server must be running locally (stdio) on that machine**, and you must use
26+
the **MCP tools** — a local stack is reached through the local MCP process, not
27+
from a cloud/sandbox session.
28+
- A **cloud / sandbox** Claude session (or the `curl` fallback running there)
29+
**cannot reach a `localhost` deployment** on the user's laptop — no base URL
30+
will fix that. In that case either (a) run this in **Claude Code on the same
31+
machine** with the MCP registered, or (b) use a **publicly reachable** base URL
32+
(the hosted remote, once it's up).
33+
- If login/any call returns a **connection error / HTTP 000 / connection refused**,
34+
do **not** keep guessing URLs. It almost always means the caller can't reach the
35+
deployment. Check: is the `brainkb` MCP running locally? Is the stack up
36+
(`http://localhost:8010/openapi.json` returns 200 on that machine)? Ask the user
37+
to confirm rather than retrying different hosts.
38+
39+
**For local testing now: run the `brainkb` MCP locally and keep the base URL at
40+
`http://localhost:8010`.** Do not fall back to curl from a non-local session.
41+
1942
## Credentials & safety
2043

2144
- BrainKB uses JWT auth. Ask the user for their **email**, **password**, and the
@@ -99,6 +122,10 @@ Call `brainkb_login(email, password, base_url?)`. Confirm with `brainkb_whoami()
99122

100123
## Fallback: curl (no MCP)
101124

125+
Only use this when running **on the same machine/network as the deployment**
126+
(so `localhost:8010` resolves to the real stack). From a cloud/sandbox session,
127+
curl to `localhost` will fail — use the local MCP instead.
128+
102129
Base = the deployment URL (default `http://localhost:8010`).
103130

104131
```bash

0 commit comments

Comments
 (0)