Was this page helpful?
npx -y zephex setup --codex writes stdio to ~/.codex/config.toml (command/args/env) — same as rewriteCodexToml in setup.ts. HTTP url blocks are optional.
Official OpenAI Codex CLI MCP documentation: OpenAI Codex MCP docs
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.
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.
Matches setup-writers.test.ts — command, args, [mcp_servers.zephex.env].
[mcp_servers.zephex]command = "npx"args = ["-y", "zephex"]env = { "ZEPHEX_API_KEY" = "mcp_sk_your_key_here" }startup_timeout_sec = 40url + http_headers — repo tools need github: paths.
[mcp_servers.zephex]url = "https://zephex.dev/mcp"http_headers = { "Authorization" = "Bearer mcp_sk_your_key_here" }startup_timeout_sec = 40Note
Setup replaces any old [mcp_servers.zephex] HTTP block with stdio.
After saving your config, confirm Zephex is connected before you rely on it in real work.
You do not call tools yourself — ask your agent in plain language. Try these once Zephex is connected:
“In Codex, run scope_task: 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.
audit_package
Deep package intelligence: CVEs with severity, breaking changes between versions, migration notes, and peer-dependency conflicts.
explain_architecture
Generates Mermaid diagrams for auth flows, service boundaries, and module dependencies so the agent reasons about structure instead of guessing.
scope_task
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.