Skip to content

Commit 680f338

Browse files
committed
docs(mcp): name the Account door for Connect an Agent, not Setup alone
#17646 delivered #16746's ruling as a `navigationContributions` entry in the `account` app and deliberately left Setup gated, so a non-admin reaches the Connect-an-Agent page — but at none of the paths the shipped texts named. - `packages/mcp/src/plugin.ts` — the stdio refusal message now names both doors (Account → Developer for any signed-in user; Setup for admins). - `packages/mcp/README.md` — same, in the `OS_MCP_STDIO_API_KEY` paragraph. - `content/docs/ai/connect-mcp.mdx` — the "Headless: API keys" section now gives both doors with their console URLs, and moves the revoke location to `Account → Developer → API Keys` for the user's own keys, noting the tenant-wide Setup list needs `manage_platform_settings`. The `OS_MCP_SERVER_ENABLED=false` callout no longer calls it a Setup page. Paths, labels and permissions read off the tree, not invented: the account entry at `packages/mcp/src/connect-ui.ts`, the group at `packages/platform-objects/src/apps/account.app.ts`, the package id at `packages/apps/account/src/index.ts`, and the route resolution in objectui's `packages/app-shell/src/utils/appRoute.ts`. Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU Co-authored-by: Claude <noreply@anthropic.com>
1 parent a90a9f2 commit 680f338

4 files changed

Lines changed: 48 additions & 11 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
Point Connect-an-Agent instructions at the Account door too, so a non-admin is told a path they can actually take
6+
7+
#17646 made the Connect-an-Agent page reachable for every signed-in user by
8+
adding a second `navigationContributions` entry into the **`account`** app's
9+
`grp_account_developer` group. It deliberately did **not** ungate Setup — that
10+
was measured to expose 14+ unrelated Setup surfaces — so the same principal
11+
still gets `403 PERMISSION_DENIED` on `GET /api/v1/meta/apps/setup`.
12+
13+
The shipped instructions never moved. The stdio transport's refusal message and
14+
this package's README both said *"Setup → Connect an Agent"*, naming the one app
15+
a non-admin cannot open — read, in the refusal's case, at exactly the moment the
16+
user is stuck. Both now name **both** doors: **Account → Developer** for any
17+
signed-in user, **Setup → Connect an Agent** for platform admins. The Setup
18+
entry is unchanged and stays where admins already look.
19+
20+
Text only — no behaviour, no gate, no authorization change.

content/docs/ai/connect-mcp.mdx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ about the only thing left to do: **connecting a client and proving it works**.
1111

1212
<Callout type="info">
1313
To turn the surface off, set `OS_MCP_SERVER_ENABLED=false` — the endpoint then
14-
returns 404 and the **Setup → Connect an Agent** page disappears with it. See
14+
returns 404 and the **Connect an Agent** page disappears with it, along with
15+
both its Setup and Account navigation entries. See
1516
[environment variables](/docs/deployment/environment-variables#mcp-server).
1617
</Callout>
1718

@@ -94,14 +95,26 @@ Clients that read an `mcpServers` map connect the same way. With an API key:
9495

9596
## Headless: API keys
9697

97-
Mint a key from **Setup → Connect an Agent** in the Console: the page lives at
98-
`/_console/apps/com.objectstack.setup/page/connect_agent` (a link in the Setup
99-
sidebar takes you there), and the **Create key** button sits at the bottom
100-
under *API keys*. The new key is shown **once**, together with a ready-to-paste
101-
`x-api-key: osk_...` header line — copy it before you dismiss the panel. The
102-
same page carries copy-paste connect snippets for Claude Code, Claude Desktop,
103-
Cursor, VS Code, and Codex, and a download link for the app's `SKILL.md`.
104-
Existing keys are listed (prefix only) and revoked under **Setup → API keys**.
98+
Mint a key from the **Connect an Agent** page in the Console. One page, two
99+
doors — which one you have depends on your permissions:
100+
101+
- **Any signed-in user** — open the avatar menu (top right) → **Profile** to
102+
enter the Account app, then **Developer → Connect an Agent** in its sidebar.
103+
Direct link: `/_console/apps/com.objectstack.account/page/connect_agent`.
104+
- **Platform admins****Setup → Connect an Agent**, at
105+
`/_console/apps/com.objectstack.setup/page/connect_agent`, reached from the
106+
Setup sidebar. The Setup app requires the `setup.access` permission, so this
107+
door alone is not enough for an ordinary member; the Account one needs none.
108+
109+
On the page, the **Create key** button sits at the bottom under *API keys*. The
110+
new key is shown **once**, together with a ready-to-paste `x-api-key: osk_...`
111+
header line — copy it before you dismiss the panel. The same page carries
112+
copy-paste connect snippets for Claude Code, Claude Desktop, Cursor, VS Code,
113+
and Codex, and a download link for the app's `SKILL.md`.
114+
115+
Your own keys are listed (prefix only) and revoked under **Account → Developer
116+
→ API Keys**. Platform admins get the tenant-wide list at **Setup → Access
117+
Control → API Keys**, which requires `manage_platform_settings`.
105118

106119
Or mint one over REST:
107120

packages/mcp/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ or the `autoStart` option.
8989

9090
`OS_MCP_STDIO_API_KEY` is not optional and has no fallback: a stdio server with
9191
no resolvable principal **refuses to start** rather than serving data unscoped
92-
(ADR-0101). Mint a key in Setup → Connect an Agent, or `POST /api/v1/keys`.
92+
(ADR-0101). Mint a key on the **Connect an Agent** page — under **Account →
93+
Developer** for any signed-in user, or **Setup → Connect an Agent** for
94+
platform admins — or `POST /api/v1/keys`.
9395

9496
The legacy `MCP_SERVER_*` spellings are still honoured with a deprecation
9597
warning.

packages/mcp/src/plugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ export class MCPServerPlugin implements Plugin {
381381
if (!apiKey) {
382382
throw new Error(
383383
'[MCP] The stdio transport is enabled (OS_MCP_STDIO_ENABLED / autoStart) but OS_MCP_STDIO_API_KEY is not set. ' +
384-
'stdio must run under a real identity — mint an API key (Setup → Connect an Agent, or POST /api/v1/keys) and set ' +
384+
'stdio must run under a real identity — mint an API key on the Connect an Agent page ' +
385+
'(Account → Developer for any signed-in user; Setup → Connect an Agent for admins), ' +
386+
'or POST /api/v1/keys, and set ' +
385387
'OS_MCP_STDIO_API_KEY=osk_.... Refusing to start an unscoped stdio server (ADR-0101).',
386388
);
387389
}

0 commit comments

Comments
 (0)