Skip to content

Codex

Setup guide only, not run live

What Zyx serves and which gates apply: Use Zyx from your AI tool.

  1. In Zyx, open Manage, API & MCP and make a key for the person Codex acts as.

  2. Keep the key in an environment variable, not in the config file, and register the server:

    Terminal window
    export ZYX_KEY=<key>
    codex mcp add zyx --url https://zyx.example.com/api/mcp --bearer-token-env-var ZYX_KEY

    For one folder:

    Terminal window
    codex mcp add zyx-client --url "https://zyx.example.com/api/mcp?folder=<folder>" \
    --bearer-token-env-var ZYX_KEY
  3. codex mcp list shows zyx as enabled with bearer token auth. The command writes an [mcp_servers.zyx] entry to ~/.codex/config.toml.

This needs the operator to publish Zyx’s MCP and OAuth paths (see the overview). Register the server without --bearer-token-env-var, then run codex mcp login zyx to open Zyx’s consent screen.

  • With codex-cli 0.160.0, codex mcp add with the lines above wrote the config, and codex mcp list showed a streamable HTTP server with bearer auth.
  • Not proven: a Codex turn calling a Zyx tool, and codex mcp login against Zyx.
  • To check it yourself: codex exec "call the zyx_status tool and print its answer" with the setup above.