> ## Documentation Index
> Fetch the complete documentation index at: https://docs.konbiniapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Connect KonbiniAPI to OpenAI Codex CLI and the Codex app using the Model Context Protocol.

Codex works with KonbiniAPI's hosted remote MCP.

## Codex CLI

<Steps>
  <Step title="Add the remote server">
    Run:

    ```bash theme={null}
    codex mcp add konbiniapi --url https://mcp.konbiniapi.com
    ```
  </Step>

  <Step title="Authenticate">
    Complete the login flow:

    ```bash theme={null}
    codex mcp login konbiniapi
    ```
  </Step>

  <Step title="Verify">
    Inside a Codex session, run `/mcp` to confirm the server is active.
  </Step>
</Steps>

If you prefer editing the config file directly, add the server to
`~/.codex/config.toml`:

```toml theme={null}
[mcp_servers.konbiniapi]
url = "https://mcp.konbiniapi.com"
```

For project-scoped config, use `.codex/config.toml` in your project root
instead.

***

## Codex app

<Steps>
  <Step title="Open MCP settings">
    In the Codex app, go to **Settings → MCP servers** and click **Add server**.
  </Step>

  <Step title="Enter the name">
    ```text theme={null}
    KonbiniAPI
    ```
  </Step>

  <Step title="Select Streamable HTTP">
    Select the **Streamable HTTP** protocol.
  </Step>

  <Step title="Enter the server URL">
    ```text theme={null}
    https://mcp.konbiniapi.com
    ```
  </Step>

  <Step title="Save the server">
    Leave the other fields empty (bearer token, headers, etc.) and click **Save**.
  </Step>

  <Step title="Authorize">
    The app will open a browser window to link your KonbiniAPI account.
  </Step>
</Steps>
