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

# Codex CLI

> Connect Versuno MCP to OpenAI's Codex CLI agent.

Codex CLI is OpenAI's agentic coding assistant. It reads MCP server definitions from a YAML config file.

## File location

```
~/.codex/config.yaml
```

Create the file if it doesn't exist.

## Config

```yaml theme={null}
mcp_servers:
  versuno:
    command: npx
    args: ["-y", "versuno-mcp"]
    env:
      VERSUNO_API_KEY: uk_live_xxx
```

## Enabling the server

Restart Codex CLI after saving the config. On the next run, Codex will spawn the `versuno-mcp` process automatically. You can confirm it loaded by running:

```bash theme={null}
codex --list-tools
```

You should see the Versuno tools in the output: the brain tools (`list_public_brains`, `query_brain`, `get_brain_tree`, `get_brain_node`) and the prompt manager tools (`list_assets`, `search_assets`, `get_asset`, `pull_asset`, `push_asset`).

## Project-scoped config

To restrict the server to a single project, add a `codex.yaml` to your project root with the same `mcp_servers` block. Project config takes precedence over the global config.

## Using it

Start a session and reference your assets naturally:

> *"Pull the 'API context' asset from Versuno and use it as background for this task."*

Codex asks for approval before each MCP tool call. Keep this enabled. See [Security](/mcp/security).

## Troubleshooting

Run Codex with verbose output to see MCP stderr:

```bash theme={null}
codex --verbose
```

The most common issues are a missing or invalid API key. See [Troubleshooting](/mcp/setup#troubleshooting).
