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

# Antigravity CLI - Connect StackOne

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

For developers adding StackOne to Google **Antigravity CLI** (`agy`) in `mcp_config.json`.

> [!WARNING]
>
> **Known OAuth caveat.** Testing against Antigravity surfaced an **IdP issuer mismatch** error during browser OAuth sign-in. If OAuth fails with an issuer mismatch or `401` error when connecting, use a [token app](https://docs.stackone.com/ai-platforms/mcp-server.md#client-setup-token-apps) header or static OAuth client as shown in **If something goes wrong** below.

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

Recommended Set up with your agentPaste this into Antigravity CLI. It walks you through each step and can update your config.

Help me connect StackOne to Google Antigravity CLI. Read the setup guide at [https://docs.stackone.com/ai-platforms/setup-guide.md](https://docs.stackone.com/ai-platforms/setup-guide.md) and guide me one step at a time.
Copy

Or follow the steps yourself

## Connect

**1. Add StackOne to mcp\_config.json**

In your terminal, run:

```bash theme={null}
agy mcp add stackone https://mcp.stackone.com/mcp
```

This writes StackOne into your global config (`~/.gemini/config/mcp_config.json` on macOS and Linux, or `%USERPROFILE%\.gemini\config\mcp_config.json` on Windows).

> [accordion] Edit mcp\_config.json by hand
>
> Open `~/.gemini/config/mcp_config.json` (or `.agents/mcp_config.json` in a project root for workspace scope) and add `stackone` under `mcpServers`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "stackone": {
>       "serverUrl": "https://mcp.stackone.com/mcp"
>     }
>   }
> }
> ```
>
> Antigravity requires the camelCase key `serverUrl` for remote HTTP servers. Keys such as `url` or `httpUrl` are not recognized.

**2. Sign in and authorize**

Start an `agy` session (or run `/mcp` inside an active session) and follow the browser sign-in prompt when Antigravity connects to `stackone`.

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. Antigravity CLI only reaches Linked Accounts in that project. To use another one, click it and pick yours.
3. Pick the work systems Antigravity 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](https://mintcdn.com/stackone-60/YmZbq_bZpKKfcffI/images/ai-platforms/oauth-consent-connect-to-your-tools.png?fit=max\&auto=format\&n=YmZbq_bZpKKfcffI\&q=85\&s=f7600605abcc0b446e7996945b0b6090)

**3. Check it works**

1. Run `agy mcp list` in your terminal (or `/mcp` inside a session) to verify `stackone` is enabled and connected.
2. In a session, send:

   ```text theme={null}
   Which of my Linked Accounts can you reach through StackOne?
   ```

> [accordion] If something goes wrong
>
> **OAuth fails with an IdP issuer mismatch or 401 error.** Use one of these workarounds:
>
> * **Token app (fastest workaround):** Create a [token app](https://docs.stackone.com/ai-platforms/mcp-server.md#client-setup-token-apps) in StackOne, then register it with `agy`:
>
>   ```bash theme={null}
>   agy mcp add --header "Authorization: Bearer YOUR_STACKONE_TOKEN" stackone https://mcp.stackone.com/mcp
>   ```
>
>   Antigravity does not expand shell environment variables inside `mcp_config.json`, so pass the literal token value in `headers`. Keep `~/.gemini/config/mcp_config.json` out of version control.
>
> * **Static OAuth client:** Follow [Clients requiring Client ID and Secret](https://docs.stackone.com/ai-platforms/mcp-server.md#clients-requiring-client-id-and-secret) with the redirect URI `https://antigravity.google/oauth-callback`, then add the `oauth` block to `mcp_config.json`:
>
>   ```json theme={null}
>   {
>     "mcpServers": {
>       "stackone": {
>         "serverUrl": "https://mcp.stackone.com/mcp",
>         "oauth": {
>           "clientId": "YOUR_CLIENT_ID",
>           "clientSecret": "YOUR_CLIENT_SECRET"
>         }
>       }
>     }
>   }
>   ```
>
> **Server doesn't load from `mcp_config.json`.** Verify the entry uses `"serverUrl"` (not `"url"` or `"httpUrl"`) and run `agy mcp list` to confirm the server is enabled (`agy mcp enable stackone`).
>
> **A system you need is missing.** Ask your StackOne admin, or see [Linking Accounts](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md).
>
> **It stopped working.** Re-authenticate from `/mcp` inside Antigravity, or clear cached tokens under `~/.gemini/antigravity/mcp_oauth_tokens.json` and reconnect. Access lasts 90 days from when you clicked **Authorize**.
>
> **It can't do something.** It can do only what your own StackOne access allows. Ask your StackOne admin.

> [accordion] Add or change accounts
>
> Antigravity 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 Antigravity 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.