Skip to main content

Overview

Claude Code is Anthropic’s CLI for developers. It has built-in commands for managing MCP servers and runs the OAuth flow itself.
For complete Claude Code MCP documentation, see the official MCP guide.

Prerequisites

  • A StackOne project you are a member of.
  • A connector profile in the project for each provider the client should reach, with the actions you want exposed enabled.
  • (Optional) A linked account for each provider. Accounts can also be linked during the consent flow.

Setup

1

Add the StackOne MCP server

Add --scope user to make it available across all your projects rather than just the current directory. See Scope options.
2

Authenticate

Claude Code waits for you to ask before opening a browser. Run /mcp, select stackone, then Authenticate.Sign in, pick the project and the linked accounts the connector should reach, then Authorize.
3

Verify connection

Check the server status:
Within a session, use /mcp to view server details and available tools, then select View tools to browse the operations you granted.
One grant covers every account you approved, so a single stackone server is usually all you need. To change which accounts or actions it can reach, re-run /mcp and authenticate again; to revoke it, use Connected Apps in the StackOne dashboard.

Scope options

Control where the configuration is stored: Example with user scope (available across all projects):
A --scope project entry is safe to commit, because the URL carries no access of its own. Each teammate authenticates as themselves and gets their own accounts.

Management commands

A session token URL carries its own credential, so it covers the cases OAuth can’t: a shared server, a scheduled job, or anywhere nobody is present to approve a consent screen.Generate one from Connectors, open a connector, then Use in Agent. Pick a linked account, set the expiry (one year by default), and copy the URL:
One URL covers one linked account, and anyone holding it has that access until it expires, so treat it like a password. See Choosing a connection method for the comparison with OAuth.There is no consent screen to set Advanced Tool Search on, so add the tool-mode query parameter instead:
Pass the token URL to claude mcp add, one server per linked account:
Use short names for easier CLI usage: gsheets, slack, hubspot-sales.
For multiple accounts, get a separate token for each and add them as distinct servers:
If you prefer to use your API key and account ID directly, set your encoded API key as an environment variable first:
Then add the server:

Programmatic integration

For programmatic integration with Anthropic’s Claude API, see the Anthropic SDK Framework Guide.

Optimize and secure

With your agent connected, use StackOne’s platform features to optimize performance and secure every call.

Advanced Tool Search

Reduce context and save tokens.

Deep Query

Search synced records for a fraction of the tokens.

Defender

Block prompt injections before they reach your agent.