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

# Codex

> Add Ocoya MCP through Codex config or the Codex CLI.

# Connect Codex to Ocoya MCP

Use this MCP URL when configuring Codex:

```txt theme={null}
https://mcp.ocoya.com
```

## Config file

<Steps>
  <Step title="Open Codex config">
    Open `~/.codex/config.toml`.
  </Step>

  <Step title="Add the Ocoya MCP server">
    Add this server entry:

    ```toml theme={null}
    [mcp_servers.ocoya]
    url = "https://mcp.ocoya.com"
    ```
  </Step>

  <Step title="Run CLI to authenticate">
    Run the OAuth login command:

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

  <Step title="Approve OAuth access">
    When Ocoya opens in your browser, sign in, approve permissions, and select the workspaces Codex can access.
  </Step>

  <Step title="Reload Codex">
    Restart Codex Desktop or open a new thread so the authenticated Ocoya tools are loaded.
  </Step>
</Steps>

## CLI setup

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

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

  <Step title="Run CLI to authenticate">
    Run:

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

  <Step title="Approve OAuth access">
    Complete the Ocoya OAuth page by approving permissions and selecting the workspaces Codex can access.
  </Step>

  <Step title="Reload Codex">
    Restart Codex Desktop or open a new thread before using the Ocoya tools.
  </Step>
</Steps>

If `codex` is not on your PATH on macOS, use the bundled app CLI:

```bash theme={null}
/Applications/Codex.app/Contents/Resources/codex mcp add ocoya --url https://mcp.ocoya.com
/Applications/Codex.app/Contents/Resources/codex mcp login ocoya
```

## Test the connection

Start with a read-only request:

```txt theme={null}
List my Ocoya workspaces.
```

If Codex does not expose Ocoya tools after authentication, restart Codex Desktop and open a new thread. You can also check MCP status with `/mcp`.

Only approve write actions such as publishing, deleting posts, or running workflows when the intended action is clear.
