---
title: "Pi Integration"
description: "Configure Pi for Tanda, verify the connection, and diagnose protocol-version failures"
---

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

# Pi Integration

Use Pi's built-in MCP support with Tanda's endpoint, `https://agents.testandaccept.com/mcp`, and your Tanda account.

> **Caution**
>
> **Compatibility notice — October 19, 2026:** Pi connections requesting MCP `2025-11-25` are
> currently blocked by Tanda's `2026-07-28` server. Browser sign-in can succeed while Pi remains
> disconnected. The setup below configures the connection; it does not resolve this [protocol
> mismatch](#protocol-version-error).

## Configure and Sign In

Run these commands in your terminal:

```bash
pi --version
pi mcp add tanda --url https://agents.testandaccept.com/mcp
pi mcp login tanda
pi mcp list
```

Approve **Read** access in the browser and **Write** if you want Pi to create or update Tanda records. Your existing organization and project permissions still apply.

Pi saves this server in `~/.pi/agent/mcp.json`. Add `--local` to `pi mcp add` for a project-specific `.pi/mcp.json`; Pi requires project trust to use it. These commands are documented in [Pi's CLI reference](https://pi.dev/docs/latest/cli#mcp-commands).

Inside Pi, `/mcp` shows connection details; `/mcp login tanda` starts sign-in. Run `/reload` after editing configuration outside the session. Use Pi's default OAuth registration; no API key, client secret, or manual `Authorization` header is needed. See [Pi's MCP guide](https://pi.dev/docs/latest/mcp).

## Choose an Organization

To default to one organization, add its name, slug, or ID as a header:

```bash
pi mcp add tanda --url https://agents.testandaccept.com/mcp --header 'Tanda-Organization=acme'
```

Replace `acme` with your organization. Pi's CLI uses `KEY=VALUE` for headers. Alternatively, merge this entry into your Pi MCP configuration:

```json
{
  "mcpServers": {
    "tanda": {
      "url": "https://agents.testandaccept.com/mcp",
      "headers": { "Tanda-Organization": "acme" }
    }
  }
}
```

The header is optional. Once connected, you can ask "Work in Acme from now on" to save a default for this connection. See [choosing a default organization](/integrations/mcp-setup/#choosing-a-default-organization).

## Verify the Connection

`pi mcp list` must show Tanda connected with tools available. A browser success page alone does not verify this. Then ask:

> List my Tanda organizations, then list my projects in Acme.

Pi normally exposes MCP tools through codemode, so they need not appear as separate tools in the model's initial tool list. Inspect `/mcp` for the server's actual tools. See [Pi tool exposure](https://pi.dev/docs/latest/mcp#control-tool-exposure).

## Protocol Version Error

If browser sign-in succeeds but Pi reports `State: failed` and HTTP `400` with this error:

```json
{
  "code": -32022,
  "message": "Unsupported protocol version: 2025-11-25",
  "data": {
    "supported": ["2026-07-28"],
    "requested": "2025-11-25"
  }
}
```

Authentication succeeded. The connection fails because Pi requests a protocol revision that the server does not accept; tool discovery cannot proceed.

As of October 19, 2026, [Pi's MCP client documentation](https://github.com/earendil-works/pi/blob/main/packages/mcp/README.md#supported-protocol-surface) lists `2025-11-25` and older revisions. It does not list `2026-07-28`. There is no verified Pi configuration workaround for this mismatch.

- Use the [Tanda web app](https://www.testandaccept.com) while compatibility is being resolved.
- Repeated sign-in, clearing credentials, changing organizations, or manually setting a protocol-version header will not provide the missing protocol support.
- A fix requires Tanda to support Pi's protocol or a Pi release that supports Tanda's. Updating Pi only helps once that compatibility is available.
- When contacting Tanda support, include `pi --version`, the server URL, and the error's `requested` and `supported` values. Omit tokens and authorization codes.

After compatibility is confirmed, run `/mcp reconnect tanda` inside Pi or `pi mcp list` from the terminal to retry.

### Update Pi

Pi can update itself from the terminal:

```bash
pi update
pi --version
```

Restart Pi afterward. Use `pi update --all` to update Pi and installed extensions together. If another package manager installed Pi, such as Nix, use that manager to update it. See [Pi's update instructions](https://pi.dev/docs/latest/cli#update-pi-or-packages).

An update is not a confirmed fix for the error above: the installed release must support a protocol version that Tanda accepts. Check its release notes, then run `pi mcp list` to verify the connection.

For `invalid_redirect`, follow [native client callback troubleshooting](/integrations/mcp-setup/#native-client-callback-errors). That is a separate failure during sign-in; it does not explain this protocol error.

Source: https://docs.testandaccept.com/integrations/pi/index.mdx
