LanaChat

Connect Codex

2 min readUpdated Markdown

Codex reads its MCP servers from a configuration file, config.toml. You add one block for LanaChat. You need Codex installed (guide) and your token (guide).

Where the file is #

  • Mac and Linux: ~/.codex/config.toml (the hidden .codex folder in your home folder).
  • Windows: %USERPROFILE%\.codex\config.toml.

If the file does not exist yet, create it. It is a plain text file.

Add the block #

Open the file in a text editor and add these lines at the end. Replace YOUR_MCP_TOKEN with your token.

[mcp_servers.lanachat]
url = "https://api.lanachat.ai/mcp"
http_headers = { "Authorization" = "Bearer YOUR_MCP_TOKEN" }

Save the file.

Safer: keep the token out of the file #

Codex can read the token from an environment variable instead. Use this block instead of the one above:

[mcp_servers.lanachat]
url = "https://api.lanachat.ai/mcp"
bearer_token_env_var = "LANACHAT_MCP_TOKEN"

Then set the variable before you start Codex. On a Mac or Linux:

read -s LANACHAT_MCP_TOKEN && export LANACHAT_MCP_TOKEN && codex

Paste the token when the cursor waits (nothing shows), press Enter, and Codex starts with the token.

Check it is connected #

  1. Start Codex: codex.
  2. Type /mcp and press Enter.
  3. lanachat is in the list of active servers.

From the terminal, codex mcp list shows the configured servers.

Note After a token rotation, put the new token in the file (or the variable) and restart Codex. After changing the boxes of the token with Edit, restart Codex too.

Next: test the connection.

Latest news about Lana on Telegram

New releases and news, first in the channel.