Codex now speaks remote Streamable HTTP natively (CLI and the Codex IDE extension share one config.toml). Connect straight to https://zephex.dev/mcp with a bearer token, or run codex mcp login zephex for OAuth — no local process. npx -y zephex setup --codex still writes the stdio block when you want the local zephex process to read your project files.
Official OpenAI Codex CLI MCP documentation: OpenAI Codex MCP docs
Without MCP, your agent guesses project layout and misses supply-chain risk. Zephex connects one hosted endpoint so every session gets the same ten tools — no per-machine npm installs, no version drift across the team.
HTTP and stdio setups both need a key from your Zephex dashboard. OAuth-only flows (ChatGPT, Claude.ai web) sign you in in the browser instead — skip this section for those.
Matches the published CLI (mcp-proxy/src/commands/setup.ts). One command signs you in, writes the correct transport, and verifies 10 tools.
Account teardown: logout vs disconnect · Connect MCP walkthrough
Search docs for “where is my MCP file” — the answer is always: run list first, then open the path it prints.
Documented paths: ~/.codex/config.toml or <project>/.codex/config.toml
Codex TOML uses command/args/env — the wizard writes stdio, not url/http_headers.
Runs the same code as mcp-proxy/src/commands/setup.ts — OAuth in browser, creates a CLI key, writes your editor config, verifies tools.
npx -y zephex setup --codexSkip browser OAuth — paste a key from zephex.dev/dashboard/keys. Must start with mcp_prod_, mcp_dev_, or mcp_sk_.
npx -y zephex setup --codex --api-key mcp_prod_your-key-herecommand/args/env — not url: Transport: stdio (see ~/.codex/config.toml or <project>/.codex/config.toml).
[mcp_servers.zephex]command = "npx"args = ["-y", "zephex"]env = { "ZEPHEX_API_KEY" = "mcp_sk_your_key_here" }startup_timeout_sec = 40After CLI install, fully restart the app if tools do not appear. Manual JSON/TOML blocks below are equivalent — use them when CLI commands are unavailable.
Full comparison: HTTP vs stdio · npx zephex reference
Replace mcp_sk_your_key_here with your key from Dashboard → API Keys. Copy the full key once at creation — paste into Authorization: Bearer … for HTTP configs, or into ZEPHEX_API_KEY for stdio/npx configs.
Codex reads the token from the ZEPHEX_API_KEY env var — no key written to config.toml. export ZEPHEX_API_KEY before launching Codex.
[mcp_servers.zephex]url = "https://zephex.dev/mcp"bearer_token_env_var = "ZEPHEX_API_KEY"startup_timeout_sec = 40Add this url-only block, then run codex mcp login zephex. Codex uses Zephex's advertised scopes (including offline_access) so refresh tokens keep working.
# Pin the OAuth callback port only if your provider requires a fixed# redirect URI. Omit it and Codex binds an ephemeral port automatically.# mcp_oauth_callback_port = 1455 [mcp_servers.zephex]url = "https://zephex.dev/mcp"startup_timeout_sec = 40What npx -y zephex setup --codex writes. Use this when repo tools should read your local project tree without passing github: URLs.
[mcp_servers.zephex]command = "npx"args = ["-y", "zephex"]env = { "ZEPHEX_API_KEY" = "mcp_sk_your_key_here" }startup_timeout_sec = 40Note
CLI shortcuts: `codex mcp add zephex --env ZEPHEX_API_KEY=mcp_sk_your_key_here -- npx -y zephex` adds the stdio server; `codex mcp login zephex` authenticates the remote HTTP server; `codex mcp list` shows status. npx setup --codex always rewrites the [mcp_servers.zephex] block to stdio.
Run these in a terminal when the editor UI is unclear — catches stale npm, wrong transport, and project shadows.
npx -y zephex@latest listnpx -y zephex@latest doctornpx -y zephex@latest repair# Fully quit the editor (Cmd+Q / Alt+F4), reopen, start a new agent sessionAfter saving your config, confirm Zephex is connected before you rely on it in real work.
Questions people ask when OpenAI Codex CLI does not show Zephex tools — indexed for docs search.
How do I connect Zephex to codex-cli?
Fastest: npx -y zephex setup --codex (browser sign-in, writes config, verifies 10 tools). Or paste manual config on this page, save, fully quit the app, reopen.
Where did setup save my codex-cli MCP config?
Run npx -y zephex@latest list — it prints every config path on this machine that references Zephex.
codex-cli works in terminal but not in the editor
GUI apps often lack nvm/fnm PATH. Run npx -y zephex@latest repair, ensure Node is on system PATH, fully quit the editor.
How do I disconnect Zephex from codex-cli?
mcpcli disconnect --codex — revokes key and strips config.
You do not call tools yourself — ask your agent in plain language. Try these once Zephex is connected:
“In Codex, run check_test: implement refresh-token rotation in our OAuth service.”
File-level plan before Codex edits Rust or Go handlers.
“get_project_context on . — we're in a trusted .codex/config.toml project.”
Confirms stack markers from the repo Codex already trusts.
“check_package on a Go module path a coworker suggested in code review.”
Registry intelligence from the same TOML-backed MCP session.
“explain_architecture for our microservices in services/* — auth between them.”
Cross-service diagram for reasoning in long Codex runs.
“read_code the main() entry in cmd/worker — outline first if the file is huge.”
Outline mode then symbol drill-down saves tokens in big files.
“keep_thinking on a race condition; then audit_headers on our public docs site.”
Debug structure plus optional URL audit in one workflow.
You do not pick tools from a menu — ask your agent in normal sentences. Half of the tools only need a package name or URL; the other half need to know which codebase you mean (your Mac/Windows project folder or a GitHub repo).
These situations usually mean the setup cannot work until you fix the underlying issue:
Codex TOML MCP registers zephex over Streamable HTTP — tools surface in codex sessions:
get_project_context
Reads your project structure, dependencies, scripts, env vars, and framework markers in one call. Replaces manually opening package.json, tsconfig, and multiple config files at the start of every session.
read_code
AST-based code extraction: pass a symbol name and get the implementation without reading entire files. Supports symbol lookup, batched file reads, and structural outlines for large files.
find_code
Ranked search across the repo for definitions, usages, and patterns. Faster than blind grep when the agent does not know where a symbol lives.
check_package
Live registry lookup for npm, PyPI, Cargo, and Go modules. Surfaces typosquat risk, maintainer changes, and suspicious version jumps before you run install.
explain_architecture
Generates Mermaid diagrams for auth flows, service boundaries, and module dependencies so the agent reasons about structure instead of guessing.
check_test
Turns a task description into the smallest file set to read or edit, with risk ratings and caller impact notes.
audit_headers
Grades a deployed URL for CSP, HSTS, TLS, cookies, and redirects. Returns fix snippets for common hosts (Vercel, Cloudflare, Nginx).
keep_thinking
Structured multi-step debugging: tracks hypotheses and conclusions so long investigations do not loop.
Zephex_dev_info
Expert patterns for authentication, databases, frontend frameworks, deployment, and mobile stacks when the agent needs vetted guidance.
project_memory
Persists decisions, gotchas, and conventions per project in ~/.zephex/memory (SQLite FTS5). recall before unfamiliar areas; remember after discoveries. Local stdio only on npx zephex.