> For the complete documentation index, see [llms.txt](https://boundaryai.gitbook.io/boundaryai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boundaryai.gitbook.io/boundaryai-docs/api-and-webhooks/mcp.md).

# Connect AI assistants (MCP)

Let Claude, ChatGPT and other AI assistants query your feedback analytics.

BAI Analytics exposes a read-only **MCP server** (Model Context Protocol), so AI assistants can answer questions like *"what are the top complaints in Customer Support EU this month?"* directly from your analysed feedback. MCP is the open standard AI tools use to reach external data; Claude, ChatGPT, and a growing set of clients speak it natively.

Everything runs from **Integrations → AI assistants** in the dashboard. There are two ways to connect, and both are read-only end to end:

| Way in                                          | Best for                                                                                       | How access is granted                                                                                                                                    |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Sign in from your assistant** (OAuth)         | Claude and ChatGPT users who want their own assistant connected without handling keys.         | You sign in to BAI Analytics from the assistant, then approve the connection on the AI assistants page. Access is personal and revocable per connection. |
| **Connect with an access key** (Advanced setup) | Claude Code, Claude Desktop, and any other MCP client that can send an `Authorization` header. | An admin creates an `mcp_read` key; the key inherits the access of the person who created it.                                                            |

Whichever you use, the assistant sees what a member of the organisation sees, and nothing it does through MCP can modify your data.

***

### What the assistant can do

Seven read-only tools, listed live on the AI assistants page exactly as the server reports them to a client:

| Tool                  | Answers                                                                                                                                                                                                                       |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list_sources`        | What feedback groups and sources exist, and how big they are. The starting point: every other tool takes the ids it returns.                                                                                                  |
| `get_source_analysis` | A source's sentiment distribution, themes, and monitor matches, over its whole history (every analysed period combined for time-tracked groups).                                                                              |
| `list_themes`         | The grouped themes of a feedback group, most talked about first, with mentions, sentiment, criticality and an AI summary. Reads the same grouping the dashboard shows; pass a `period_key` to read one period's own grouping. |
| `get_theme_verbatims` | The actual customer comments the analysis assigned to one grouped theme (the same ones the Evidence view lists), optionally narrowed by sub-theme, sentiment, or period.                                                      |
| `search_feedback`     | Individual feedback items that arrived through the API, filtered by source or field. Native in-app survey responses are not included.                                                                                         |
| `list_monitors`       | Custom Monitoring monitors of a feedback group, with their alert settings, coverage and match counts.                                                                                                                         |
| `get_sentiment_trend` | Sentiment and volume over time for a feedback group with trend tracking on.                                                                                                                                                   |

Results are paginated and sized for a model's context; the tool descriptions tell the assistant how to page and what each field means, so a good first question is simply *"Show me my feedback groups, then help me understand the main customer concerns in one of them."*

***

### Sign in from your assistant (Claude, ChatGPT)

This is the guided path on the AI assistants page. It walks through four steps: **Choose → Connect → Approve → Ask**.

1. **Enable it once for the organisation.** An organisation administrator turns on *Enable for this organisation*. Until then, members see that an administrator must enable assistant access. Sign-in based connections also have to be enabled for your environment by the BAI Analytics team; if the page says the assistant isn't available yet, contact support and say which assistant you want.
2. **Choose** your assistant (Claude or ChatGPT) and say whether BAI Analytics is already listed in it. If your workspace administrator has already added BAI Analytics, you only need to open it in your assistant and select *Connect*.
3. **Connect.** For a first-time setup the page shows every value the assistant asks for: the connection name, the server address to paste, and the authentication settings (OAuth; the page tells you whether to leave the client settings empty or to paste a client ID, and there is never a client secret). In Claude that is *Customize → Connectors → + → Add custom connector*; in ChatGPT on the web it is *Plugins → Add → Add MCP server* after turning on Developer mode under *Settings → Security and login*. When the assistant prompts you, sign in to BAI Analytics, choose the same organisation you use in the dashboard, and allow the sign-in request.
4. **Approve.** Return to the AI assistants page. The new connection appears as *Awaiting your approval*; review it and choose *Allow read-only access*. Signing in alone never exposes any feedback: until you approve, the assistant can only initialize and list the tools. Only the person who connected can approve their own connection; administrators can disconnect any connection but cannot approve on someone else's behalf.
5. **Ask.** Back in your assistant, enable BAI Analytics for the conversation and start with the suggested first question.

Connections are listed on the page with their status (*Awaiting your approval*, *Access authorized*, *Disconnected*) and the time of the last successful request. Disconnecting a connection denies the assistant's next request immediately; turning assistant access off for the organisation disconnects every sign-in based connection, and turning it back on does not restore them. Access keys are independent of all this.

{% hint style="info" %}
BAI Analytics is not a pre-installed connector in these assistants, so the assistant-side step above is a one-time setup. For a company workspace, the page also offers a **Publish BAI to your workspace** kit: step-by-step values an administrator of ChatGPT, Claude, Gemini Enterprise or Microsoft 365 Copilot enters once so that every member can connect, plus a ready-to-send message if you are not that administrator.
{% endhint %}

***

### Connect with an access key (Advanced setup)

For Claude Code, Claude Desktop, agents you run yourself, or any client that can send a bearer header. Open **Advanced setup** on the AI assistants page:

1. **Create a key for your assistant** (admin-only). The key gets the `mcp_read` permission only and is shown once; label it after the assistant and the person using it (say, *Claude Desktop, Marketing*). You can also create it under *Developer tools → API Keys* with the *AI Assistant (Read Only)* permission.
2. **Configure your client.** The page shows the server URL and a ready-to-copy block for each client with your key filled in. The production server URL is:

```
https://boundaryai-backend-279197672085.europe-west9.run.app/api/mcp
```

{% tabs %}
{% tab title="Claude Code" %}

```bash
claude mcp add --transport http --scope user bai-analytics \
  https://boundaryai-backend-279197672085.europe-west9.run.app/api/mcp \
  --header "Authorization: Bearer inpk_live_..."
```

Check it with `claude mcp list`. The user scope keeps the key out of any file committed to your repository.
{% endtab %}

{% tab title="Claude Desktop" %}
Claude Desktop's configuration file only launches local programs, so `mcp-remote` bridges it to the server. Add this to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`; Windows: `%APPDATA%\Claude\`) and restart the app:

```json
{
  "mcpServers": {
    "bai-analytics": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://boundaryai-backend-279197672085.europe-west9.run.app/api/mcp",
        "--transport", "http-only",
        "--header", "Authorization: Bearer inpk_live_..."
      ]
    }
  }
}
```

{% endtab %}

{% tab title="Any MCP client" %}
Configure a **streamable HTTP** server (protocol revision 2025-06-18, stateless, no SSE streams, no JSON-RPC batching):

```json
{
  "url": "https://boundaryai-backend-279197672085.europe-west9.run.app/api/mcp",
  "headers": {
    "Authorization": "Bearer inpk_live_..."
  }
}
```

A quick technical check from a terminal:

```bash
curl -sS https://boundaryai-backend-279197672085.europe-west9.run.app/api/mcp \
  -H "Authorization: Bearer inpk_live_..." \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

{% endtab %}
{% endtabs %}

3. **Check access.** Paste the key into *Check access* on the page: it runs a real `initialize` and `tools/list` against the server and reports the tools available. It confirms the key works, not that your assistant is configured.

Then just ask: *"Using BAI Analytics, what changed in customer sentiment since last month, and which monitor is firing most?"*

ChatGPT cannot use an access key: its custom-connection form has no field for a static header, so use the sign-in path above.

#### How access keys behave

* An `mcp_read` key can query analytics but can **never push, create, or send**. The other scopes deliberately don't include MCP, so an existing integration key doesn't silently become an assistant's query surface. A key without MCP access gets 403 `MCP_NOT_ALLOWED`.
* **Keys inherit the access of the person who created them**, re-checked on every request. If that person's account is deactivated or they leave the organisation, the key stops working at once (403 `MCP_KEY_UNBOUND`) and the page lists it as stopped; an administrator revokes it under Developer tools and creates a replacement if needed.
* The **MCP keys** list on the page shows each key, whose access it inherits, and its status; the **Usage** panel shows requests per tool over the last days, including technical checks.
* Rate limits apply as on any key (60 requests/minute by default); see [Authentication & API keys](/boundaryai-docs/api-and-webhooks/authentication.md).

***

### Good practices

* **Create a dedicated `mcp_read` key per assistant** and label it accordingly, so you can revoke one assistant's access without touching your integrations.
* **Treat the assistant's access like a team member's read access.** It can see everything the organisation's analytics contain, and what it retrieves is shared with the assistant provider you chose.
* **Feedback text is untrusted content.** The server tells the assistant to treat verbatims as data to analyse, never as instructions; keep that in mind if you build your own agent on top.
