AI connection (MCP)

Connect Ravand to Codex (CLI, IDE and desktop app) with MCP

Codex (the CLI, the IDE extension and the desktop app) reads MCP servers from ~/.codex/config.toml. Ravand supports both signing in and a token.

5 min readUpdated:
  1. Open the config file

    Open ~/.codex/config.toml; on Windows it is %USERPROFILE%\.codex\config.toml.

  2. Way one: sign in

    Add a [mcp_servers.ravands] section with only url = "https://ravands.app/mcp". Then run codex mcp login ravands in a terminal; the browser opens the Ravand approval page.

  3. Way two: token in the file

    In the same section write url = "https://ravands.app/mcp" and http_headers = { Authorization = "Bearer <token>" }. It does not depend on an environment variable, which makes it the most reliable for the desktop app.

  4. Environment variable only if permanent

    With bearer_token_env_var = "RAVANDS_MCP_TOKEN" the variable must exist in the environment Codex started in. On Windows save it with setx RAVANDS_MCP_TOKEN "<token>" and reopen Codex. Do not set bearer_token_env_var and an Authorization header together.

  5. Check it

    codex mcp list should show ravands. In a chat ask “What can you access in Ravand?”.

Tips

  • For plugin mode use /mcp/plugin instead of /mcp; it accepts both ways.
  • If you rename the server, run login with the same name.

Common questions

What does “Environment variable … is not set” mean?

Codex could not find the variable named in bearer_token_env_var and did not start the server at all. Either set the variable permanently and reopen Codex, or delete that line and put the token in http_headers.

Codex gets 401?

The token is revoked or expired, or MCP is off for the business. Create a new token or run codex mcp login again.