---
title: 'MCP for AI agents'
description: 'How to connect Claude, Codex, OpenCode, OpenClaw, or Hermes to the platform via MCP.'
type: doc
locale: en
canonical: 'https://app.teal.band/en/docs/integrations/mcp-agent'
updated: '2026-07-30'
---

# MCP for AI agents

How to connect Claude, Codex, OpenCode, OpenClaw, or Hermes to the platform via MCP.

MCP gives an external AI agent working access to the platform: to read analytics, help with surveys, and perform actions on behalf of the user. The connection goes through a Streamable HTTP endpoint:

```txt
https://<platform-domain>/mcp
```

On the first request, the agent opens an OAuth login in the browser. You see which client is requesting access and what scopes it requests. After confirmation, the token is stored by the MCP client itself; you do not need to copy the secret manually.

One endpoint works for all your organizations. The active organization is taken from the authorized session; if the agent supports organization switching, it will be able to select another available organization.

## Claude

For Claude Code, add an HTTP MCP server:

```bash
claude mcp add --transport http platform https://<platform-domain>/mcp
```

Open Claude Code and run `/mcp`, then go through OAuth in the browser. If you need to trigger the login from the terminal, use:

```bash
claude mcp login platform
```

## Codex

Add a Streamable HTTP server:

```bash
codex mcp add platform --url https://<platform-domain>/mcp
```

Then perform OAuth login:

```bash
codex mcp login platform
```

In the Codex CLI, the connection status is visible via `/mcp`.

## OpenCode

Add the server to `opencode.json`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "platform": {
      "type": "remote",
      "url": "https://<platform-domain>/mcp",
      "enabled": true
    }
  }
}
```

On first use, OpenCode will prompt to authorize. You can manually launch OAuth like this:

```bash
opencode mcp auth platform
```

## OpenClaw

Save the MCP server as Streamable HTTP and enable OAuth:

```bash
openclaw mcp add platform \
  --url https://<platform-domain>/mcp \
  --transport streamable-http \
  --auth oauth
```

Start the login and test the connection:

```bash
openclaw mcp login platform
openclaw mcp doctor platform --probe
```

If `login` returns a confirmation code, complete the login with the command:

```bash
openclaw mcp login platform --code <code>
```

If editing the config manually, the format is as follows:

```json
{
  "mcp": {
    "servers": {
      "platform": {
        "url": "https://<platform-domain>/mcp",
        "transport": "streamable-http",
        "auth": "oauth"
      }
    }
  }
}
```

## Hermes

Add the server to `~/.hermes/config.yaml`:

```yaml
mcp_servers:
  platform:
    url: "https://<platform-domain>/mcp"
    auth: oauth
```

Start Hermes. On the first connection, it will open OAuth in the browser and save the tokens for subsequent sessions. After changing the config in an already open session, execute:

```txt
/reload-mcp
```

## Access

The agent only receives confirmed scopes:

- `analytics:read` — read surveys, results, analytics, and growth points;
- `surveys:write` — create, edit, and publish surveys;
- `org:manage` — manage organizations, settings, and participants.

Scopes do not replace the user's role. If your role does not allow you to perform an action in the organization, the agent will not be able to perform it either.

## Privacy

MCP does not open participant responses bypassing the platform's rules. No one sees raw answers; anonymized data and aggregates are shown externally only with a sufficient number of answers (at least 5). If there is little data, the agent will receive a limited result.

For regular scripts and server integrations, use [API tokens](https://app.teal.band/en/docs/integrations/api-tokens.md). MCP is specifically needed for AI agents that require tools, resources, prompts, OAuth, and individual scopes.

## Related pages

- [API tokens](https://app.teal.band/en/docs/integrations/api-tokens.md) — Personal tokens and bearer access to \`/api/v1\`.
- [Billing and Plans](https://app.teal.band/en/docs/account/billing-plans.md) — Balance, plan, promo codes, and AI feature limits.
- [REST API](https://app.teal.band/en/docs/integrations/rest-api.md) — Tokens, Bearer access, request example, and links to the OpenAPI reference.

## Read next

- [REST API](https://app.teal.band/en/docs/integrations/rest-api.md) — Tokens, Bearer access, request example, and links to the OpenAPI reference.
