Skip to main content

Prerequisites

Codex CLI requires Node.js 22+. Install it from nodejs.org. Install Codex CLI globally:
Verify the installation:
The Codex CLI and Codex IDE extension share the same ~/.codex/config.toml configuration. If you’ve already set up Danube in the IDE extension, it will work in the CLI automatically.

Setup

1

Add the Danube MCP Server

Add Danube as a Streamable HTTP server in ~/.codex/config.toml (codex mcp add cannot set custom headers, so edit the file directly):
Alternatively, Danube also accepts your API key as a bearer token, which works with the CLI. With DANUBE_API_KEY exported in your shell profile:
This keeps the key itself out of config.toml.
2

Verify Connection

Launch Codex CLI and use the /mcp command to verify the server is connected:
Then type:
You should see danube listed with its available tools.

Project-Scoped Configuration

For a per-project setup, create .codex/config.toml in your project root with the same [mcp_servers.danube] entry instead of editing the global ~/.codex/config.toml.

Troubleshooting

  1. Verify installation:
  2. Check npm global bin directory is in PATH:
    The codex command should be in {prefix}/bin/
  3. Add to PATH (if needed):
  • Check your internet connection
  • Verify the URL is correct: https://mcp.danubeai.com/mcp
  • Test the health check: curl https://mcp.danubeai.com/health
  • Increase the timeout in config: startup_timeout_sec = 30
  • Run /mcp in Codex to check the server status
  • Verify the config file syntax: cat ~/.codex/config.toml
  • Restart Codex after configuration changes