# Connect Codex to NocoDB

> Part of the NocoDB documentation (MCP Server > Connect). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/mcp/codex
Last updated: 2026-10-21

Connect the Codex CLI to NocoDB with the NocoDB MCP server: add the TOML block from your MCP connection to the Codex config file, then run codex mcp list.

The Codex CLI works with NocoDB through the NocoDB MCP server. You add a TOML block from your MCP connection in NocoDB to the Codex configuration file.

|                     | Codex                                                                  |
| ------------------- | ---------------------------------------------------------------------- |
| **Type**            | Desktop (CLI)                                                          |
| **How it connects** | TOML block, over HTTP                                                  |
| **You need**        | An [MCP connection](/docs/mcp/connections#server-configuration-nocodb) |

## Set up Codex

Codex CLI connects directly to the MCP endpoint over HTTP. Thus it does not need the `mcp-remote` bridge. It uses a TOML configuration, not the shared JSON block.

1. Open `~/.codex/config.toml`. If the file does not exist, create it.
2. Add the TOML block from the **Codex** tab of the MCP endpoint dialog. Use the URL and token that you generated [here](/docs/mcp/connections#server-configuration-nocodb).
3. Run `codex mcp list`. Make sure that the server is connected.

```toml
[mcp_servers.NocoDB_MCP]
url = "https://your-domain.com/mcp/<ncId>"
http_headers = { "x-api-key" = "<ncToken>" }
```

<Callout type="info">
  The table key has to be a bare TOML key, so NocoDB replaces any character outside letters, digits, 

  `_`

  , and 

  `-`

   in the endpoint name: an endpoint named 

  `My Base MCP`

   appears as 

  `[mcp_servers.My_Base_MCP]`

  .
</Callout>

## Related

* [Connections and access](/docs/mcp/connections)
* [What the assistant can do](/docs/mcp#what-you-can-do)
* [All MCP clients](/docs/mcp#pick-your-client)

---

## Related pages

- [Connect Claude to NocoDB](https://nocodb.com/docs/mcp/claude.md): Connect Claude to NocoDB from the Claude Connectors directory with OAuth, add a custom connector for self-hosted NocoDB, or set up Claude Desktop manually.
- [Connect Claude Code to NocoDB](https://nocodb.com/docs/mcp/claude-code.md): Connect Claude Code to NocoDB with one command: add https://app.nocodb.com/mcp as an HTTP MCP server and sign in with OAuth, or use a token.
- [Connect ChatGPT to NocoDB](https://nocodb.com/docs/mcp/chatgpt.md): Connect ChatGPT to NocoDB with the NocoDB MCP server: create a connector with the URL https://app.nocodb.com/mcp and sign in to NocoDB with OAuth.
- [Connect Cursor to NocoDB](https://nocodb.com/docs/mcp/cursor.md): Connect Cursor to NocoDB with the NocoDB MCP server: add the JSON block from your MCP connection as a custom MCP server in the MCP tab of Cursor Settings.
- [Connect Windsurf to NocoDB](https://nocodb.com/docs/mcp/windsurf.md): Connect Windsurf to NocoDB with the NocoDB MCP server: add the JSON block from your MCP connection to the Cascade MCP plugins in Windsurf Settings.
- [Connect AntiGravity to NocoDB](https://nocodb.com/docs/mcp/antigravity.md): Connect AntiGravity to NocoDB with the NocoDB MCP server: paste the JSON block from your MCP connection into the raw MCP config of the agent window.
