Skip to main content
The Gemini CLI connects to MCP servers defined in its settings and discovers OAuth on a remote server on its own.

Before you start

  • 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.

Connect StackOne

1

Add the server to Gemini

-s user saves the server in your user settings, so it works from any folder. Without it, the CLI writes to the current folder’s settings and refuses in a folder it doesn’t trust yet.Or add it to ~/.gemini/settings.json under mcpServers by hand:
2

Sign in and authorize

Run gemini. The CLI discovers that StackOne uses OAuth and opens your browser. If it does not, authenticate from inside the session:
  1. Sign in to StackOne. In a desktop app or code editor, this opens in your browser.
  2. Check the project at the top left. Gemini CLI only reaches Linked Accounts in that project. To use another one, click it and pick yours.
  3. Pick the work systems Gemini CLI can use (your Linked Accounts).
  4. If you see Load tools when needed, leave it on.
  5. Click Authorize.
StackOne's consent screen for Claude, with three Linked Accounts selected, Load tools when needed on, and the Authorize button
3

Check it works

Run /mcp to list connected servers and their tools.
Gemini CLI reaches only the Linked Accounts you approved when you connected. To add one you link later, or one someone shares with you afterwards:
1

Open Connected Apps

In the StackOne dashboard, go to Connected Apps.
2

Edit the connection

  1. Open the ⋮ menu on the row for Gemini CLI and select Edit tool access.
  2. Select the Linked Account.
  3. Click Save changes.
To review or revoke the connection, use the same ⋮ menu in Connected Apps.