# ChatGPT and the OpenAI API

Add Covo to ChatGPT as a custom MCP server, and call it from the OpenAI Responses API, the Agents SDK and Codex.

## ChatGPT

1. Open chatgpt.com/plugins, choose the plus button, then **Add custom MCP server**.
2. Give it a name (Covo) and description, and under Connection enter `https://covo.lanaai.io/mcp`.
3. For authentication choose **OAuth**. ChatGPT finds everything else on its own.
4. Create it, then review the tools ChatGPT discovered. When you first use it, approve Covo on the Covo consent screen.

> ChatGPT connects custom MCP servers with OAuth only; it cannot send a personal access token. Write tools ask for your confirmation in ChatGPT; Covo's read tools are marked read-only. Workspace plans may need an admin to turn on developer mode.

## OpenAI Responses API

POST https://api.openai.com/v1/responses:

```json
{
  "model": "gpt-5",
  "input": "List my Concierges and tell me which one is live.",
  "tools": [
    {
      "type": "mcp",
      "server_label": "covo",
      "server_description": "Covo: manage Concierges (AI representatives).",
      "server_url": "https://covo.lanaai.io/mcp",
      "authorization": "cc_pat_...",
      "allowed_tools": [
        "get_account",
        "list_agents",
        "get_agent"
      ],
      "require_approval": "never"
    }
  ]
}
```

`authorization` takes the token (OpenAI does not store it, so send it on every request). Leave `require_approval` at its default for tools that change things.

## Agents SDK (Python)

```python
from agents.mcp import MCPServerStreamableHttp

covo = MCPServerStreamableHttp(
    name="covo",
    params={"url": "https://covo.lanaai.io/mcp", "headers": {"Authorization": f"Bearer {token}"}},
)
```

## Codex

```bash
codex mcp add covo --url https://covo.lanaai.io/mcp --bearer-token-env-var COVO_PAT
```

Or with OAuth: `codex mcp login covo`. In `config.toml`:

```toml
[mcp_servers.covo]
url = "https://covo.lanaai.io/mcp"
bearer_token_env_var = "COVO_PAT"
```
