Add STACK to Claude Code as an MCP server. STACK speaks OAuth 2.1 with PKCE and Dynamic Client Registration (RFC 7591), which is what Claude Code's MCP add command requires. No API-key copy-paste; you approve scopes in your browser the first time the CLI connects.
For authentication, client compatibility, and shared service setup, see MCP setup.
Connect the service and approve the fleet policy before starting automated work. The approved provisioner enrolls workers with their own keys. A worker uses its key to obtain a short-lived MCP session, then calls stack_start_mission with the job’s exact access and limits.
Use the returned Passport for calls through STACK. Routine allowed calls require no additional approval. Call stack_renew_mission to continue the same job without resetting its allowance. The client can obtain another session and reconnect with the worker’s key when its MCP session expires.
Interactive OAuth signs the client in as a member. Fleet execution uses the enrolled worker’s identity. Use a client or application runtime that can present the worker’s session token for this flow.
From your terminal, run:
claude mcp add --transport http --scope user stack https://mcp.getstack.run/mcpOn first connection, Claude Code discovers STACK's OAuth metadata at /.well-known/oauth-authorization-server, registers itself as an OAuth client via /oauth/register, and opens your browser to getstack.run to approve the scopes.
If you want STACK available across all your Claude Code projects, add --scope user. To scope to one project only, use --scope project (the default in current versions; check claude mcp add --help).
claude mcp listYou should see stack with status connected. Inside a Claude Code session, the model can now call STACK tools just like any other MCP-registered tool.
Once connected, Claude can invoke the STACK tools allowed by the OAuth Bearer token. A team member's token retains that member's role and connection restrictions. The most useful tools in a coding session:
Non-GET proxy calls require an authority_request_id created and persisted before the call. Reuse it only for the unchanged request. See Proxy operation recovery.
Full tool reference at /docs/mcp-tools.
Invite team members at getstack.run/team. Each person signs in to STACK and authorizes Claude Code with their own login. STACK retains that member identity on the OAuth session, so requests remain attributable to the member and are limited by the member's current role and allowed connections.
Disconnect or revoke from the STACK dashboard at getstack.run/team or programmatically via POST /v1/passports/revoke. The next STACK-verified request from Claude Code fails. A call already forwarded to an upstream service is not rolled back.