# Connect an AI client

Connect a supported MCP client to CodeDeb using its native OAuth flow. Client settings vary across versions; the CodeDeb server URL stays the same.

## ChatGPT

In ChatGPT settings, connect a custom remote MCP service using the CodeDeb endpoint. Follow the CodeDeb sign-in and account-consent screen; available integration controls depend on your ChatGPT account and administrator settings.

```
https://api.codedeb.com/api/workspace/mcp
```

## Claude Code

Add the HTTP MCP server, then authorize in the browser. Confirm the connected CodeDeb account before reading or changing business records.

```
claude mcp add --scope user --transport http codedeb https://api.codedeb.com/api/workspace/mcp
claude mcp login codedeb
```

## Codex

Register the remote server and finish OAuth sign-in. The client should discover only authorized business tools.

```
codex mcp add codedeb --url https://api.codedeb.com/api/workspace/mcp
```

## OpenCode

Use this minimal configuration in an existing opencode.json, preserving any other MCP entries. Then run the authorization command and confirm the connection.

```
{
  "mcp": {
    "codedeb": {
      "type": "remote",
      "url": "https://api.codedeb.com/api/workspace/mcp",
      "enabled": true,
      "oauth": { "scope": "commerce:read commerce:write" }
    }
  }
}

opencode mcp auth codedeb
opencode mcp list
```

## Read-only access

For a read-only integration, request the commerce:read scope rather than commerce:write. The server still enforces the authenticated owner account and each business module grant.

## Machine-readable contract

- Canonical chapter: https://www.codedeb.com/docs/mcp/connect
- Reference: https://www.codedeb.com/mcp/setup.md
- Documentation index: https://www.codedeb.com/llms.txt
