> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini CLI - Connect StackOne

> Use the StackOne MCP server to connect your work systems to the Gemini CLI.

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](https://docs.stackone.com/gateway/concepts/organizations-and-projects.md) you are a member of.
* A [connector profile](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md) in the project for each provider the client should reach, with the actions you want exposed enabled.
* (Optional) A [linked account](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md) for each provider. Accounts can also be linked during the consent flow.

## Connect StackOne

**1. Add the server to Gemini**

```bash theme={null}
gemini mcp add --transport http stackone https://mcp.stackone.com/mcp
```

Or add it to `~/.gemini/settings.json` under `mcpServers` by hand:

```json theme={null}
{
  "mcpServers": {
    "stackone": {
      "httpUrl": "https://mcp.stackone.com/mcp"
    }
  }
}
```

**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:

```text theme={null}
/mcp auth stackone
```

1. Sign in to StackOne. In a desktop app or code editor, this opens in your browser.
2. If StackOne asks for a project, pick yours and click **Continue to Accounts**.
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 Select accounts screen with two Linked Accounts ticked, Load tools when needed on, and the Authorize button](https://mintcdn.com/stackone-60/RgaE_4ZxFuvAQ6gS/images/ai-platforms/oauth-consent-select-accounts.png?fit=max\&auto=format\&n=RgaE_4ZxFuvAQ6gS\&q=85\&s=66ef4eb4d8bf6e5246e5f01ec959c187)

**3. Check it works**

Run `/mcp` to list connected servers and their tools.

> [accordion] Add or change accounts
>
> 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**](https://app.stackone.com/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**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.