---
title: "Connect Channels to Codex"
canonical: https://workspace.socra.com/docs/channels/integrations/codex
---

# Connect Channels to Codex

Connect Codex to the hosted Channels MCP server with a registered public OAuth client. Keep your existing Codex servers and instructions. You need a local Codex installation and permission to manage OAuth clients in your Cloud Project.

## 1. Select the Project and enable Channels

Open [Cloud Projects](https://platform.socra.com/projects), choose your Account, then use **Manage Cloud Projects → Switch Projects** to search for and select your Project. The manager closes. Confirm the active Project in **Switch Cloud Project**.

If you opened inspection details, use **Back to list → Switch Projects**. Close the manager if the Project is already active. Create a Project if needed.

Open **Enabled services**. If Channels is listed, continue. Otherwise choose **Enable service → Channels** and confirm it appears. Keep the Project selected. If access is denied, send the request to the Project owner and use **Check access again** after it is resolved.

## 2. Register a public native client

Open **OAuth → Overview**. If needed, choose **Set up OAuth**, enter **Channels for Codex**, complete the consent information and save. Preserve existing configuration.

Open **OAuth → Clients → Create client**. Name it **Channels for Codex** and choose **Native**. Leave JavaScript origins empty.

Use a local callback port that is available on your computer. This guide uses `43219`; if you choose another port, change it in both the registered Redirect URL and the Codex configuration below. Add this Redirect URL:

```url
http://127.0.0.1:43219/callback
```

Create the client and copy its client ID. This public native connection uses PKCE without a client secret. Do not create or paste a secret for it.

## 3. Configure Codex

Open `~/.codex/config.toml`, Codex's default user configuration file, and add the following server and OAuth sections. Replace `YOUR_CLIENT_ID` with the public client ID. See [Codex's configuration locations and scopes](https://developers.openai.com/codex/config-basic/) if you use a different Codex home or a trusted project's configuration.

Use a distinct server name if `socra-channels` already exists. Replace `socra-channels` in **both TOML section names**, the **login command**, and the **verification references** below with that same new name. Preserve the existing server.

```toml
[mcp_servers.socra-channels]
url = "https://channels.socra.cloud/mcp"

[mcp_servers.socra-channels.oauth]
client_id = "YOUR_CLIENT_ID"
callback_url = "http://127.0.0.1:43219/callback"
callback_port = 43219
```

The callback URL and listener port must agree. Codex documents these settings in its [MCP OAuth configuration guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). Keep unrelated configuration unchanged.

## 4. Authorize your Account

Run:

```bash
codex mcp login socra-channels
```

Open the authorization link when prompted, sign into Socra, choose the Account you use in Channels and approve access. Keep the terminal running until login finishes. The browser returns to the local listener.

If interrupted, run login again for the same server. A callback error needs the exact registered URL and matching listener port checked before retrying. If the port is busy, choose an available port and update both Platform and Codex. Do not substitute an unrelated application's client ID.

## 5. Verify the connection

Run:

```bash
codex mcp list
```

Start a new Codex session and open `/mcp` to check that `socra-channels` is available. If you changed an existing running session's configuration, restart that session first. Enable `channels_list` if your tool configuration disables it, and review any approval Codex requests. [Codex's MCP guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) describes server and tool controls.

Send:

```text
Use Socra Channels to make exactly one channels_list tool call with limit 1. Do not read messages or send, create, update or delete anything. Report whether the call succeeded. An empty list is valid.
```

Inspect the tool execution. Confirm `channels_list` ran with `limit: 1` and returned a result. An empty list is valid; an answer without a real tool call does not verify the connection.

If no tool runs, check `/mcp`, the server's enabled state and your tool configuration. If the call returns an error, keep its text and check the authorized Account and enabled Channels service in the client's Project. Ask the Account or Project owner to resolve denied permissions before retrying. Server configuration, authorization and a successful tool call are separate checks.

## See also

- [Connect Channels to Grok web](/docs/channels/integrations/grok)
- [Conversations and access](/docs/channels/concepts/conversations-and-access)
- [Use the Channels CLI](/docs/channels/reference/cli)
