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

# Codex

> Wire Keenable into Codex over MCP — and stop its built-in web search from winning every lookup.

*MCP server*

Codex reaches Keenable two ways: the plugin listing it shares with ChatGPT, or an MCP entry in `config.toml`. The MCP route takes your own API key, so it is the one to use on a paid tier — but it needs a second step that is easy to miss.

<Warning>
  **Adding the server is not enough.** Codex ships its own web search, enabled by default, and it will keep reaching for that instead of Keenable — so the tools look connected in `/mcp` yet never get called unless you name them in the prompt. [Turn the built-in search off](#turn-off-the-built-in-search) and the problem goes away.
</Warning>

## Install

### Add the server

Add the following to `~/.codex/config.toml`:

```toml theme={"system"}
[mcp_servers.keenable]
url = "https://api.keenable.ai/mcp"
http_headers = { "X-API-Key" = "keen_<your_key>" }
```

The key travels in the `X-API-Key` header, not an environment variable — Codex reads nothing from `KEENABLE_API_KEY` for a remote server. Create one in the [console](https://app.keenable.ai/console); see [Authentication](/authentication). Omit the `http_headers` line and the server still answers, on the shared public tier at [lower rate limits](/rate-limits).

### Turn off the built-in search

Codex enables web search by default for local chats, in `cached` mode — results come from an index OpenAI maintains rather than a live fetch. Setting `web_search` to `disabled` removes that tool entirely, and with nothing to fall back on Codex uses `search_web_pages` for every lookup.

It is a **top-level** key, so it has to sit above the `[mcp_servers.keenable]` line. A bare key written after a table header belongs to that table, which would make it `mcp_servers.keenable.web_search` — not a setting Codex looks at, and it fails quietly. The finished file:

```toml theme={"system"}
web_search = "disabled"

[mcp_servers.keenable]
url = "https://api.keenable.ai/mcp"
http_headers = { "X-API-Key" = "keen_<your_key>" }
```

<Note>
  The mode key takes four values: `cached` (the default), `indexed`, `live`, and `disabled`. A full-access sandbox — `--yolo` or `danger-full-access` — silently upgrades `cached` to `live`, so a permissive session searches the live web whether or not you asked for it.

  Don't confuse the mode with the `[tools.web_search]` table, which carries settings like `allowed_domains` and `context_size` and does **not** switch the tool off. Older releases used `[tools] web_search = true` and then `[features] web_search_request = true`; both are deprecated in favour of the top-level key.
</Note>

Want to keep the built-in tool for other work? Scope the change to a profile instead, and invoke it with `codex --profile research`. Here the key belongs inside the table, which is the one place nesting it is correct:

```toml theme={"system"}
[profiles.research]
web_search = "disabled"
```

### Tell the agent which tool to use

Codex reads `AGENTS.md` for project instructions — `~/.codex/AGENTS.md` applies everywhere. Naming the tools there is worth doing even with the built-in search disabled, because Codex loads MCP tool schemas on demand: it sees a tool's name and description upfront and fetches the rest only when it decides the tool is relevant, so that decision is made on the description alone.

```markdown theme={"system"}
## Web search

- Use `search_web_pages` for anything that needs the web.
- Follow a search with `fetch_page_content` to read the sources you cite.
```

### Verify

Run `/mcp` in the TUI to confirm the server connected and both tools are listed, then ask something that needs the live web. Codex should call `search_web_pages` without being told to.

<Note>
  Still going around Keenable on a recent Codex? Check `codex --version`. Releases before v0.121.0 registered on-demand tool names in a format their own lookup table did not match, which produced exactly this symptom for every MCP server, not just this one.
</Note>

## No config file

Keenable is also published in OpenAI's Plugins Directory, the catalog Codex shares with ChatGPT. Install it from the [listing](https://chatgpt.com/plugins/plugin_asdk_app_6984a0b396708191a7856354b86ce047) and sign in through OAuth — there is no key to paste. Usage is attributed to the account you connect and metered against that account's organization, so it draws on the same [rate limits](/rate-limits) and [credits](/credits) as every API key the organization has issued. The same listing covers [ChatGPT](/integrations/chatgpt).

The built-in search competes with the plugin exactly as it does with the MCP server, so the `web_search` change above is worth making on either route.

→ [Full MCP server reference](/mcp-server)
