You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ai): connect-mcp — record what a first real connection actually hits
Walked the page against a live app (Claude Code 2.1 + `@objectstack/mcp` 17.2)
and wrote down the four places a first attempt stalls that the page did not
cover:
- OAuth track: after `claude mcp add`, `claude mcp list` reports "Failed to
connect" until `/mcp` → Authenticate is done in a NEW session — the health
probe is answered 401, not a broken setup. A running session never picks
the server up.
- API-key track: where the key is minted (Setup → Connect an Agent, page
route, button at the bottom, shown once with a ready `x-api-key:` line),
that a keyed registration shows "Connected" with no login, and that
`claude mcp add` is local-scope by default (`-s user` for everywhere).
- Verify: an anonymous curl that must return 401, and a keyed curl walk
through initialize → tools/list → query_records, with the two gotchas that
cost a retry — the argument is `objectName`, and its value is the API name
from `list_objects` (`crm_opportunity`, not `opportunity`).
- Troubleshooting: four rows for the above symptoms.
Docs-only; publishes nothing.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two details that trip up a first attempt: the object argument is
277
+
**`objectName`**, and its value is the object's API name as returned by
278
+
`list_objects` (`crm_opportunity`, not `opportunity`) — a wrong name comes back
279
+
as `Object 'opportunity' not found`.
280
+
281
+
Then, in the client, ask the agent something only the live schema can answer:
221
282
222
283
> "What objects does this app have, and what fields does the main one carry?"
223
284
@@ -235,6 +296,10 @@ skill and a guided `/objectstack:connect` command.
235
296
236
297
| Symptom | Cause → fix |
237
298
|:---|:---|
299
+
|`claude mcp list` says **✘ Failed to connect** right after `claude mcp add` (OAuth track, no `--header`) | Expected until you authenticate — open a new session, run `/mcp`, pick the server, *Authenticate*. Or attach an API key, which connects without a login step |
300
+
|**✘ Failed to connect** / `ConnectionRefused` on a server that used to work | The app is not running. Start it — the client reconnects on its own, no need to re-register |
301
+
| The server is missing from `/mcp` in a running session | Sessions read MCP config at start — open a new one. If it is still missing, you registered at **local** scope from another directory; re-add with `-s user`|
302
+
|`Object 'x' not found` on `query_records` / `get_record`| Wrong object name — pass the API name from `list_objects` in **`objectName`** (`crm_opportunity`, not `opportunity`) |
238
303
|`404` on `/api/v1/mcp`| The HTTP surface is disabled — unset `OS_MCP_SERVER_ENABLED` (default is on) |
239
304
|`501 Not Implemented`| The MCP plugin isn't part of this build — check your stack's plugins |
240
305
|`mcp` missing from `GET /api/v1/discovery` and no Connect-an-Agent card, but `OS_MCP_SERVER_ENABLED` is on | The same cause as the `501` above, seen from the other side: the surface is *enabled* but not *serveable*, so discovery declines to advertise a route that would 501 rather than over-promising it (`declared === enforced`). Load the MCP plugin — `os serve` / `os dev` do it for you; a host that embeds `@objectstack/rest` directly must add `@objectstack/mcp` itself |
0 commit comments