> ## Documentation Index
> Fetch the complete documentation index at: https://developer.communicate.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect with MCP

> Connect an MCP client to Communicate's authenticated Streamable HTTP endpoint.

The remote MCP endpoint is:

```text theme={null}
https://app.communicate.so/mcp
```

It exposes one read-only tool:

| Tool                      | Scope         | Result                                |
| ------------------------- | ------------- | ------------------------------------- |
| `communicate_list_agents` | `agents:read` | Agents in the authenticated workspace |

## Create an MCP access token

Create an API key with `agents:read`, then exchange its client ID and one-time `ck_` secret for a token bound to the MCP resource.

```bash theme={null}
export COMMUNICATE_CLIENT_ID="your_key_id"
export COMMUNICATE_CLIENT_SECRET="ck_your_secret"

export COMMUNICATE_MCP_TOKEN="$(curl -sS \
  -u "$COMMUNICATE_CLIENT_ID:$COMMUNICATE_CLIENT_SECRET" \
  https://app.communicate.so/api/v1/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "scope=agents%3Aread" \
  -d "resource=https%3A%2F%2Fapp.communicate.so%2Fmcp" \
  | jq -r '.access_token')"
```

The token expires after one hour. Request a new token before reconnecting after expiry.

## Configure your client

Use Streamable HTTP and send the token as a bearer credential:

```json theme={null}
{
  "mcpServers": {
    "communicate": {
      "url": "https://app.communicate.so/mcp",
      "headers": {
        "Authorization": "Bearer ${COMMUNICATE_MCP_TOKEN}"
      }
    }
  }
}
```

For Codex, use the equivalent environment-backed bearer token setting:

```toml theme={null}
[mcp_servers.communicate]
url = "https://app.communicate.so/mcp"
bearer_token_env_var = "COMMUNICATE_MCP_TOKEN"
```

<Warning>
  Do not place the client secret or bearer token directly in a committed configuration file. The endpoint does not accept long-lived `ck_` secrets.
</Warning>

## OAuth discovery

MCP clients can discover the authentication contract from:

```text theme={null}
https://app.communicate.so/.well-known/oauth-protected-resource/mcp
https://app.communicate.so/.well-known/oauth-authorization-server/api/v1
```

MCP tokens accept only `agents:read`. Use a separate REST token with `chat:write` for [agent conversations](/agents/rest-workflows).
