> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/mcp/connect/codex.md).

# Codex

Connect Celigo Platform MCP to [Codex](https://developers.openai.com/codex), OpenAI's coding agent. The Codex CLI, the Codex IDE extension, and the ChatGPT desktop app share one configuration, so you add the server once and all three can use it.

## Prerequisites

* Codex installed and signed in: the Codex CLI, the Codex IDE extension, or the ChatGPT desktop app.
* An integrator.io user (see [Connect a client](https://developer.celigo.com/mcp/connect.md)).

## Connect

Add the server with one command:

```bash
codex mcp add celigo --url https://api.integrator.io/celigo-mcp
```

Swap the host to target another region. See [Pick your endpoint](https://developer.celigo.com/mcp/connect.md#pick-your-endpoint).

Codex saves the server to `~/.codex/config.toml` and starts the Celigo sign-in in your browser right away. Sign in and pick the account and environment the agent should work in. If you close the browser before you finish, run `codex mcp login celigo` to start the sign-in again.

The command writes this entry. You can also add it to `~/.codex/config.toml` by hand, then run `codex mcp login celigo` to sign in:

```toml
[mcp_servers.celigo]
url = "https://api.integrator.io/celigo-mcp"
```

### Add it from the IDE extension or the ChatGPT desktop app

A server you add with the CLI already appears in the IDE extension and the ChatGPT desktop app, because they read the same `~/.codex/config.toml`. To add it from one of them instead:

1. In the IDE extension, open the gear menu and select **MCP servers**. In the ChatGPT desktop app, open **Settings** and select **MCP servers**.
2. Select **Add server**, enter the name `celigo`, choose **Streamable HTTP**, and enter `https://api.integrator.io/celigo-mcp`.
3. Save the server, then select **Restart extension** in the IDE extension or **Restart** in the desktop app.
4. Select **Authenticate** next to `celigo` and sign in.

### Use an API token instead

For headless use, have Codex read a token from an environment variable. The token never lands in `config.toml`; the entry stores only the variable's name.

```bash
export CELIGO_API_TOKEN="<YOUR_API_TOKEN>"
codex mcp add celigo --url https://api.integrator.io/celigo-mcp \
  --bearer-token-env-var CELIGO_API_TOKEN
```

Codex sends the token as a bearer `Authorization` header and skips the browser sign-in. Set the variable in every shell that runs Codex.

## Verify

Check that Codex sees the server and is signed in:

```bash
codex mcp list
```

The `celigo` row shows **OAuth** in the **Auth** column, or **Bearer token** if you use an API token. **Not logged in** means the sign-in hasn't finished; run `codex mcp login celigo`.

Then, in a Codex session, ask:

> List my Celigo connections.

Codex calls `list_connections` on the `celigo` server and reports the result. In the CLI, `/mcp` lists the connected servers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.celigo.com/mcp/connect/codex.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
