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

# Codex

> Connect Codex to your QuivaWorks account and give it repository guidance

Before you start, create a key and store it as described in [Local AI agents](https://docs.quiva.ai/developers/agents/overview.md#store-the-key). The examples assume `QUIVA_API_KEY` is exported in the environment Codex starts from.

Codex reads MCP servers from `~/.codex/config.toml` (or `.codex/config.toml` in a trusted project).

## Remote server

```toml theme={null}
[mcp_servers.quiva]
url = "https://api.quiva.ai/mcp"
env_http_headers = { "x-api-key" = "QUIVA_API_KEY" }
```

`env_http_headers` maps the `x-api-key` header to the environment variable that holds the key, so the key itself never sits in the file. Run `codex mcp list` to see configured servers.

## Local stdio servers

Use a profile so every server shares one key store:

```toml theme={null}
[mcp_servers.quiva-flows]
command = "sh"
args = ["/path/to/mcp/quiva-flows-mcp/bin/run.sh"]

[mcp_servers.quiva-flows.env]
QUIVA_PROFILE = "<name>"
```

Add one table per server you want. See [Run the servers locally](https://docs.quiva.ai/developers/mcp/local-setup.md) for the list and requirements.

## Guide Codex with AGENTS.md

Codex reads `AGENTS.md` from your repository (from the project root down to the folder you are working in) and from `~/.codex`. A short note keeps it safe and consistent:

```md theme={null}
## QuivaWorks

- Use the `quiva` MCP server for flows, records, documents, spaces and tasks.
- For pulling, diffing, pushing or copying account configuration, use the quiva-config script
  (`node <skill dir>/scripts/quiva.mjs`). Run a dry run first and show me the diff before `--yes`.
- Never ask me for an API key in chat. If a profile is missing, tell me to run `profile add` in my own terminal.
```

## The quiva-config script from Codex

Codex does not load Claude Code plugins. Copy the repository's `skills/quiva-config` folder somewhere Codex can read it and refer to it from `AGENTS.md` as above. See [Skills](https://docs.quiva.ai/developers/agents/skills.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.