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

# Codex

Add Kinesis to Codex, sign in with OAuth, or read an API key from your environment.

Connect Kinesis from the Codex CLI. You need Codex installed and a [Kinesis account](https://portal.kinesis.network/signup).

## Connect with your Kinesis account

{% stepper %}
{% step %}

### Add the server

```bash
codex mcp add kinesis --url "https://mcp.kinesis.network/mcp?mode=all"
```

This setup uses individual action names. Codex saves the connection in its user configuration, shared by local Codex clients using the same configuration home.
{% endstep %}

{% step %}

### Sign in

Follow the sign-in page if Codex opens it. Otherwise run:

```bash
codex mcp login kinesis
```

Sign in to Kinesis, review the permissions and select the organizations the connection can reach. Complete organization SSO if prompted, approve, then return to Codex.

On a machine without a browser, use:

```bash
codex mcp login kinesis --no-browser
```

Open the printed authorization URL in a browser on another machine. After approval, paste the resulting callback URL into the waiting terminal when Codex asks for it. Keep that URL private.
{% endstep %}

{% step %}

### Check the connection

Run `codex mcp list`, then start a new Codex session. In the CLI, `/mcp` shows active servers. Send:

```
Use Kinesis to show my identity and list the organizations I can access.
Then ask which organization to use and list its projects. Do not change anything.
```

{% endstep %}
{% endstepper %}

## API key from an environment variable

Create a scoped key in [Account settings → API keys](https://portal.kinesis.network/dashboard/account), and make `KINESIS_API_KEY` available to the process that launches Codex. For CI, use its secret store.

```bash
codex mcp add kinesis --url "https://mcp.kinesis.network/mcp" --bearer-token-env-var KINESIS_API_KEY
```

Codex reads the variable at runtime. This command saves **the variable's name, not the key**, in its configuration. No OAuth login is needed for this option. The example uses the default compact catalog.

## Configure the file directly

Instead of the CLI command, add this to `~/.codex/config.toml`:

```toml
[mcp_servers.kinesis]
url = "https://mcp.kinesis.network/mcp"
# Uncomment for API-key authentication instead of OAuth:
# bearer_token_env_var = "KINESIS_API_KEY"
```

For OAuth, leave the bearer setting commented and run `codex mcp login kinesis`. If the entry already exists, edit it rather than creating a duplicate table. Restart the client or start a new session after configuration changes.

These manual Codex setups use the standard Kinesis endpoint. The [OpenAI MCP profile](/mcp/openai-profile.md) is a separate option for integrations that require its credential restrictions.

[Connection options](/mcp/connect.md#choose-a-catalog-mode) · [Troubleshooting](/mcp/connect.md#troubleshooting) · [Official MCP documentation](https://developers.openai.com/codex/mcp)


---

# 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://docs.kinesis.network/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.
