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

# Pi - Connect StackOne

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

For developers adding StackOne to Earendil's **Pi** coding agent.

> [!NOTE]
>
> **Not yet verified end-to-end.** Pi supports MCP through community adapter extensions such as `pi-mcp-adapter`, and StackOne has not yet tested this flow end-to-end. If OAuth sign-in fails in your setup, use the token app header fallback under **If something goes wrong**.

## 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 Pi. It walks you through each step and can run the commands for you.

Help me connect StackOne to Pi. 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. Install the MCP extension**

Pi's core keeps MCP handling out of the base binary to save context tokens. Install `pi-mcp-adapter` (or `pi-mcp-extension` if you prefer) and restart Pi:

```bash theme={null}
pi install npm:pi-mcp-adapter
```

**2. Add StackOne to mcp.json**

Open `~/.pi/agent/mcp.json` (or `~/.config/mcp/mcp.json`) for all projects, or `.mcp.json` at a project's root for one repository. Add `stackone` under `mcpServers` and save:

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

**3. Sign in and authorize**

Start `pi` in your terminal and trigger OAuth sign-in for StackOne:

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

Pi opens StackOne in your browser.

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. Pi only reaches Linked Accounts in that project. To use another one, click it and pick yours.
3. Pick the work systems Pi 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)

**4. Check it works**

Run `/mcp` (or `/mcp-adapter`) in Pi to confirm `stackone` is connected, then send:

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

> [accordion] If something goes wrong
>
> **`/mcp-auth` command isn't recognized.** Make sure you installed `pi-mcp-adapter` with `pi install npm:pi-mcp-adapter` and restarted your Pi session.
>
> **Sign-in doesn't open or you're running over SSH.** If browser OAuth can't complete in a remote or headless session, create a [token app](https://docs.stackone.com/ai-platforms/mcp-server.md#client-setup-token-apps) and pass it in `headers` inside `mcp.json` (keeping any token file out of git):
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "stackone": {
>       "url": "https://mcp.stackone.com/mcp",
>       "headers": {
>         "Authorization": "Bearer YOUR_STACKONE_TOKEN"
>       }
>     }
>   }
> }
> ```
>
> **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-run `/mcp-auth stackone` inside Pi to refresh your OAuth session. 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
>
> Pi 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 Pi 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.