MCP setup, per client
STACK's MCP server is at https://mcp.getstack.run/mcp. Setup differs slightly between AI clients; the underlying contract is the same: the client opens a browser to STACK's OAuth authorization endpoint, the user approves, and the client stores the resulting tokens in its own config.
The three-surface model
Before picking a setup path, know which surface you actually want. STACK exposes three:
- MCP -- for your AI assistant talking to STACK in conversation. Used during dev, planning, one-off ops. Set up once per machine, per client.
- SDK -- for your agent code in production. new Stack({ agent_id }) on every run.
- CLI -- for you in your shell. stack-cli auth login + stack-cli monitor --follow.
These are not alternatives. A typical workflow uses all three: MCP while building with Claude, SDK in the agent runtime, CLI for ad-hoc ops + audit tail.
Claude Code
claude mcp add stack --transport http https://mcp.getstack.run/mcpThat is the entire setup. On the first MCP call, Claude Code receives a 401 with a WWW-Authenticate header pointing at our protected-resource metadata, follows the OAuth dance in your browser, and stores the resulting access + refresh tokens in its own config (not yours). You see one approval screen on getstack.run/oauth/consent; after that, every subsequent Claude Code invocation reuses the stored tokens transparently.
Claude Desktop
Install via the Anthropic MCP Registry once it accepts STACK (we have submitted; status TBD). In the meantime, edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\\Claude\\claude_desktop_config.json on Windows:
{
"mcpServers": {
"stack": {
"transport": {
"type": "streamable-http",
"url": "https://mcp.getstack.run/mcp"
}
}
}
}Restart Claude Desktop. The OAuth dance fires the next time you ask Claude to do something that calls a STACK tool.
ChatGPT (Plus, Pro, Business, Enterprise, Edu)
ChatGPT is the only client that mandates OAuth -- it refuses API keys outright. STACK works in all paid tiers, with capability gating:
- Plus / Pro -- read-only tools (browse skills, list passports, read audit). Mutations are blocked at the ChatGPT layer.
- Business / Enterprise / Edu -- full read + write.
Plus / Pro setup
Settings -> Connectors -> Developer Mode -> New connector. Enter URL: https://mcp.getstack.run/mcp. Approve in the browser when prompted.
Business+ setup
Workspace admin -> Permissions -> Connected Data -> Add MCP server. Same URL. The OAuth approval is per-user; admins enable the server, users individually approve their own access.
Cursor
// ~/.cursor/mcp.json (or your project's .cursor/mcp.json)
{
"mcpServers": {
"stack": {
"url": "https://mcp.getstack.run/mcp"
}
}
}Restart Cursor. Same OAuth flow as Claude Code on first call.
Continue, Cline, Zed, others
Each has its own MCP config UX -- check their docs for the exact file path. The values are the same as Cursor: transport streamable-http (or simply url) pointing at https://mcp.getstack.run/mcp. OAuth happens automatically on the first 401.
Raw protocol (self-config)
Any MCP-spec-compliant client can drive the dance manually. The two relevant endpoints:
GET https://mcp.getstack.run/.well-known/oauth-protected-resource
GET https://api.getstack.run/.well-known/oauth-authorization-serverThe first announces the resource + authorization server pointer. The second is the standard OAuth 2.0 Authorization Server Metadata document (RFC 8414): authorization, token, registration, device, revocation endpoints + the supported scopes.
Verifying the connection
Once setup is done, ask your AI client "list my STACK agents". It should call the stack_list_agents MCP tool. If your operator has none yet, the response is an empty list (still success); if you get an authentication error, the OAuth flow did not complete -- inspect the client's logs and retry.
Legacy sk_live_* keys still work for clients that pre-date OAuth or for self-hosted setups. Add the key to the same MCP config under a Bearer header, e.g. {"headers": {"Authorization": "Bearer sk_live_..."}}. OAuth is recommended for human-driven flows; API keys remain valid for CI.