-
Notifications
You must be signed in to change notification settings - Fork 3
plat 487
PLAT-487 — Connecting an MCP client answered "404" on Allow where Builder/Relay authoring is switched off, and the consent page listed everything
| Coordination | Value |
|---|---|
| State | fixed on main (consent scopes, refusal reason, simpler page); deployed: see the Update line below |
| Date | 2026-10-05 |
| Owner | integrations |
Connecting Claude Code to Excellence (/api/external/v1/mcp, OAuth) asked for every advertised scope (mcpOAuthScopes, including builder:chat and relays:write). The consent page listed ten permissions and a "workflows this connection may build" box (the only choice was the owner's test workflow). Allow answered 404 (POST /api/oauth/mcp/consent, 20:44:06 on 2026-10-04): Decide validated the REQUESTED scopes, relays:write needs AGENTWORKS_MCP_BUILDER_ENABLED=true, which is unset in the running agent on Excellence (and RTS), and every Decide error was mapped to a bare 404 that the page showed as "Request failed with status code 404". The Relays product being on for a user is a different switch (userAllowedProduct); the external Builder/Relay authoring is gated by that env flag.
-
mcpOAuthScopesFordropsbuilder:chatwhere the server flag is off andrelays:writeunless the flag is on AND the account may edit and has the Relays product (the same rule the consent check enforces; on Excellence only 2 of 10 users have Relays); the consent GET, the consent POST andDecideall use the scopes that will really be granted, so a client that requests everything is approved for the rest. - A refusal the person can act on is returned as
400witherror_descriptionand shown on the page instead of the 404 (mcpOAuthRefusal). - The page leads with up to five plain lines (see and run workflows, use Crews, make changes, review Code, Vault tools); the exact permissions are behind "Show details".
- Tests:
mcp_oauth_scopes_test.go;MCPOAuthConsent.test.tsx(grouping, refusal reason);builderOAuthSetupnow switches Builder on explicitly.
A client still cannot ask for a smaller set of scopes through Claude Code's mcp add; it requests all advertised ones. Whether Excellence should enable AGENTWORKS_MCP_BUILDER_ENABLED is the owner's decision (it lets an MCP client edit plans/code and Relays).
AGENTWORKS_MCP_BUILDER_ENABLED=true is now in deploy/rootless-linux/products/agents/product.env (EXTRA_ENV), Excellence only. RTS and Confida are unchanged (flag off). It stays a per-person capability: a connection is bounded to the workflows the person selected and may edit, validateBuilderGrant re-checks live workflow write access (owner or write, so a read-only user cannot edit a plan) and the account's product on every call, and relays:write is offered only to accounts with the Relays product (2 of 10 users on Excellence at the time).
The flag is now set by every deploy of Excellence (products/agents/product.env), Confida (products/confida/product.env) and RTS (deploy/aws-ec2/server/build-and-activate.sh). Config only until each server is next deployed; Excellence first (deploy 8f6e06845). The per-person limits above are unchanged and hold on every server.
The owner asked to remove the "workflows this connection may build" box ("it should depend on my user permission"). Builder grants are now all-workflows tokens bounded by the account live (see DECISIONS 2026-10-05); the consent page lost the box; the selection tests were removed or turned around (two Go tests, three page tests; the page now has one test for "no selection"). Existing connections that list workflow IDs keep their bound. State: fixed on main, deployed nowhere yet (Excellence has the 8f6e0684 release without this).
Auto-synced from docs/ on main. Edit there, not here.