MCP clientsAI

Connect Codex to thirds.ai

Use with your agent

Give this prompt to your AI agent. The agent does the task for you.

Read https://thirds.ai/docs/mcp/codex and help me connect Codex to thirds.ai with an API key

Codex can use thirds.ai tools from the desktop app, CLI, and IDE extension. These clients share the same MCP configuration. Create an API key on the API keys page.

Install the server

Set THIRDS_API_KEY in the environment that starts Codex. Then run:

Shell
codex mcp add thirds --url https://thirds.ai/mcp \
  --bearer-token-env-var THIRDS_API_KEY

For the same setup by hand, add this table to ~/.codex/config.toml:

toml
[mcp_servers.thirds]
url = "https://thirds.ai/mcp"
bearer_token_env_var = "THIRDS_API_KEY"

For one trusted project, you can put the same table in .codex/config.toml. Codex reads the named environment variable and sends it as a bearer token. The official Codex MCP guide defines this TOML format.

Check the connection

Run:

Shell
codex mcp list

Restart Codex after you change the configuration or environment. Ask it to list the thirds.ai tools. The desktop app, CLI, and IDE extension use the same config.toml, so you only need to add the server once.

Read the main MCP guide before your first paid call. It explains credit approval and safe retries.

FAQ

Why does Codex show that the token is missing?

Check that THIRDS_API_KEY is set in the environment that starts Codex. A terminal variable may not be available to an app that you open from the dock.

Can I put the API key in http_headers?

Codex supports static headers, but bearer_token_env_var keeps the key out of the configuration file. Use the environment variable for this setup.

Does this setup work in the Codex desktop app?

Yes. The desktop app, CLI, and IDE extension share the MCP configuration. Restart the client after you add the server.

Ready to make your first file?

Start in the playground with a gallery template, or get an API key and send your first request from your own terminal.