Skip to content

Commit de19489

Browse files
Elon Muskclaude
andauthored
docs(readme): note the sign-in step the claude mcp add one-liner needs (#10319) (#11019)
The "Your app is AI-operable, for free" section's copy-paste command — `claude mcp add --transport http my-app http://localhost:3000/api/v1/mcp` — registers the MCP server correctly, but the next natural step (an agent actually calling a tool) 401s until the caller signs in. Measured live, at head, against a freshly booted `examples/app-crm`: unauthenticated `initialize` returns `401 {"code":"UNAUTHENTICATED","message":"Unauthorized: a valid OAuth access token or API key is required"}`, matching the finding this closes. The README gave no hint that a sign-in step follows the command. The linked docs page, content/docs/ai/connect-mcp.mdx ("Connect an MCP Client"), already carries the step in full — interactive OAuth browser login for the exact same command, plus a headless API-key flow for CI/containers — so the fix is a one-sentence pointer here, not a rewrite of a page that already correctly carries the weight this README delegates to. Fixes #10319 Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r Co-authored-by: Claude <noreply@anthropic.com>
1 parent 45204a5 commit de19489

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

.changeset/readme-mcp-add-auth.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
docs: note that the root README's `claude mcp add` one-liner needs a follow-up sign-in step (#10319)
6+
7+
The "Your app is AI-operable, for free" section's copy-paste command
8+
(`claude mcp add --transport http my-app http://localhost:3000/api/v1/mcp`)
9+
registers the server correctly, but running it alone and then calling a tool
10+
401s — measured live, at head, against a freshly booted `examples/app-crm`:
11+
unauthenticated `initialize` returns
12+
`401 {"code":"UNAUTHENTICATED","message":"Unauthorized: a valid OAuth access
13+
token or API key is required"}`, exactly as the finding this closes reported.
14+
The README gave no hint that a sign-in step follows the command.
15+
16+
The linked docs page, [Connect an MCP
17+
Client](https://objectstack.ai/docs/ai/connect-mcp), already carries the step
18+
in full (interactive OAuth browser login, plus a headless API-key flow for
19+
CI/containers) — confirmed by reading it and by reproducing both paths live:
20+
the same unauthenticated call 401s with a `WWW-Authenticate` header
21+
advertising OAuth metadata, and minting a key via `POST /api/v1/keys` with a
22+
session cookie and sending it back as `x-api-key` returns `200` with a valid
23+
`initialize` response. So the fix is a one-sentence pointer in the README, not
24+
a rewrite of the docs page it already correctly delegates to.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,11 @@ as a human:
172172
claude mcp add --transport http my-app http://localhost:3000/api/v1/mcp
173173
```
174174

175-
Objects are exposed automatically; actions opt in with `ai: { exposed: true }`.
176-
See [Connect an MCP Client](https://objectstack.ai/docs/ai/connect-mcp).
175+
The first tool call opens a browser to sign you in — each deployment is its own
176+
OAuth server, so there's no token to copy-paste. Headless setups (CI,
177+
containers) use an API key instead. Objects are exposed automatically; actions
178+
opt in with `ai: { exposed: true }`. See
179+
[Connect an MCP Client](https://objectstack.ai/docs/ai/connect-mcp) for both flows.
177180

178181
## This repo
179182

0 commit comments

Comments
 (0)