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

# How to connect Codex

> Configure Jolts in Codex CLI with a private bearer-token environment variable.

## Configure the connection

Create a Jolts [API key](/authentication). Copy the company-data MCP endpoint from Jolts'
connection guide; the documentation site's `/mcp` endpoint searches documentation instead.

Merge this into `~/.codex/config.toml`, replacing the endpoint placeholder:

```toml theme={null}
[mcp_servers.jolts]
url = "YOUR_MCP_ENDPOINT"
bearer_token_env_var = "JOLTS_API_KEY"
```

In Bash, enter your key privately and launch Codex from that shell:

```bash theme={null}
read -r -s -p "Jolts API key: " JOLTS_API_KEY; printf '\n'
export JOLTS_API_KEY
codex
```

The environment variable must be available to the process running Codex. A separately launched
desktop application does not necessarily inherit this shell's environment. Never put the key
in a prompt or commit it to a configuration file. Jolts uses bearer authentication, not OAuth login.

## Check the connection

Ask Codex to inspect the available Jolts tools without searching. Expect `search_companies`,
`get_companies`, and `get_usage`. Ask it to call `get_usage` without arguments; this is unmetered.
For your first search, follow [find active demand](/use-cases/find-active-demand) and approve
the tool call only after reviewing its inputs. Company operations need an active or trialing
subscription and consume the same allowance as API requests.

## If it does not connect

* Missing environment variable: restart Codex from the shell where you exported it.
* Unauthorized: check the key is current and belongs to the intended Jolts account.
* Tools unavailable: inspect your organization's MCP policy and refresh the connection.
* Search failed: use the structured error and [troubleshooting guide](/troubleshooting).

See [official Codex MCP configuration](https://developers.openai.com/codex/mcp),
the [tool reference](/mcp-tools), and [response handling](/mcp-responses).
