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

This command adds the server to your user scope, so it’s available across all your projects. Remove --scope user if you only want it available in 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. For a comparison of each connection method, see Choosing a connection method.From the StackOne dashboard, go to Connectors, open a connector, then click Use in Agent.
  1. Pick a linked account.
  2. Set the expiry (one year by default).
  3. Select HTTPS MCP and copy the URL. It should be in the format of:
This URL covers one linked account, and anyone holding it has that access until it expires, so treat it like a password.To enable Advanced Tool Search, add the tool-mode query parameter to the URL:
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.