Skip to main content
API Preview
Developers

Codex CLI

Add ~alter to OpenAI Codex CLI's MCP configuration, then query identity from the terminal. Anonymous tools work with no account; connect via OAuth to reach the authenticated tools.

Connection

Endpointhttps://mcp.truealter.com/api/v1/mcp
TransportStreamable HTTP (JSON-RPC 2.0 over POST)
Auth headerAuthorization: Bearer <capability_token> (omit for anonymous tools)
Config~/.codex/config.toml

Setup

1Add the server

Codex reads MCP servers from config.toml. Point it at the endpoint and pass the OAuth-bearer capability token in the auth header.

toml
[mcp_servers.alter]
url = "https://mcp.truealter.com/api/v1/mcp"
http_headers = { "Authorization" = "Bearer <capability_token>" }

2Keep the token out of the file (recommended)

env_http_headers reads the value from a named environment variable at runtime, so the capability token never lives in config.toml.

toml
[mcp_servers.alter]
url = "https://mcp.truealter.com/api/v1/mcp"
env_http_headers = { "Authorization" = "ALTER_CAPABILITY_TOKEN" }

Verify

Start Codex and list its tools. ~alter's tools appear alongside the rest once the server connects.

Notes

  • -Omit the header keys entirely to use only the anonymous tools.
  • -Codex connects to the Streamable HTTP endpoint directly by url; no stdio bridge is needed.