# Codex integration

## What you get

Use Codex with KeepBal discovery, inspection and paid tool execution through one key and prepaid wallet.

## Prerequisites

Create a KeepBal account and API key. Signup includes $1 credit once. Keep the key private and ensure sufficient wallet credit before executing a tool.

[Create an account](/sign-up) · [API keys](/console/keys)

## Setup

Install Codex and export KEEPBAL_API_KEY in the environment that launches it. Add this to ~/.codex/config.toml, shared by the CLI, IDE extension and desktop client.

```toml
[mcp_servers.keepbal]
url = "https://keepbal.com/mcp"
bearer_token_env_var = "KEEPBAL_API_KEY"
```

Run codex mcp list or open /mcp in the TUI. If the header is missing, check the launch environment. The default tool timeout is 60 seconds and startup timeout is 10 seconds.

[Codex official documentation](https://developers.openai.com/codex/mcp)

## Worked example: read a web page

Ask your agent: Find the page-content tool, inspect exa/contents, then fetch https://example.com with text enabled and summarize the result. Review the published price before approving execution. Data is from Exa; this does not imply partnership.

```text
search_tools {"query":"page contents"}
inspect_tool {"tool":"exa/contents"}
run_tool {"tool":"exa/contents","input":{"body":{"urls":["https://example.com"],"text":true}}}
```

These are MCP tool names and argument objects. The client wraps them in tools/call requests. If run_tool returns pending with a run_id, call get_run {"run_id":"RETURNED_RUN_ID"}; do not repeat run_tool.

## Troubleshooting

Initialization and tools/list work without a key; every tools/call requires a valid bearer key, including search and inspect. For 401 check the key and client launch environment. For insufficient_credits check Wallet; for rate_limited respect Retry-After. Check Usage after uncertain outcomes before retrying a paid call. Truncated or unsupported MCP results must not be retried.

[Exa contents tool](/tools/exa/contents) · [Search and extraction tools](/tools/category/search-and-extraction) · [Errors](/docs/errors) · [MCP reference](/docs/mcp) · [All integrations](/integrations)

[Integrations](/integrations)

