OpenAI Codex CLI
OpenAI's lightweight open-source coding agent that runs in your terminal.
Tags
Description
Docs moved from developers.openai.com/codex to learn.chatgpt.com. The codex mcp-server command and standalone codex-mcp-server binary were removed; integrations should migrate to the experimental Codex app server. codex mcp still manages external MCP servers.
Agent access
Related
- AGENTS.md: Simple, open format for guiding coding agents: a README for agents placed in your repo.
- Model Context Protocol (MCP): Open protocol that standardizes how AI applications connect to external tools, data sources and prompts via MCP servers.
- Codex App Server: Experimental JSON-RPC interface that powers rich Codex clients (e.g. the VS Code extension); embed Codex in your product. Replaces the removed codex mcp-server.
Guides & comparisons
- Confine a coding agent's filesystem MCP access (Guide): Separate the workspace a coding agent sees from the files its MCP server can touch. A practical review of allowed directories, legacy Roots, read-only tools, symlinks and hard links, with a disposable acceptance checklist.
- Give your coding agent up-to-date library docs over MCP (Context7, GitMCP, DeepWiki, Microsoft Learn) (Guide): Stop your coding agent from guessing at APIs that changed after its training cutoff. Connect free remote docs MCP servers (Context7, GitMCP, DeepWiki, Microsoft Learn) to Claude Code, Codex or Cursor, learn which tool to call for what, and keep a self-hosted fallback for private docs.
- Scan agent-written code for vulnerabilities with the Semgrep MCP server (Guide): Give a coding agent a deterministic security scanner. Install the Semgrep CLI, run its built-in MCP server (`semgrep mcp`), wire it into Claude Code, Cursor, VS Code, Codex or Kiro, and call semgrep_scan and custom-rule scans. Includes two gotchas we hit, and when SonarQube's MCP server fits better.
- Bridge stdio and remote MCP servers: mcp-remote, Supergateway, mcp-proxy and mcpo (Guide): Put a local stdio MCP server on HTTP so remote agents can reach it, or plug a remote server into a client that only speaks stdio. Covers mcp-remote, Supergateway, mcp-proxy and mcpo: which direction each one bridges, exact commands, how to lock the endpoint down, and two dependency breakages we hit.
- Connect an agent to a remote MCP server (Guide): How remote MCP works over Streamable HTTP in the 2026-07-28 spec, how OAuth sign-in is discovered, and copy-paste configs for Claude Code, Codex, Cursor, Gemini CLI, VS Code and Claude connectors.
- Runtime guardrails for agents: Guardrails AI, NeMo Guardrails, Invariant and HOL Guard (Comparison): Four open-source guardrail layers compared: where each one sits, what a rule looks like, whether it can check tool calls, which checks need a model, what leaves your machine and how actively each is maintained. All four were installed and run on 2026-11-01.
- Agent environment frameworks compared: Harbor vs AgentEnv Framework vs Seahaven (Comparison): Three open-source Python frameworks for building the environments agent evals and RL runs happen in: Harbor (container tasks), Scale AI's AgentEnv Framework and Kiln AI's Seahaven (synthetic SQLite worlds). Covers tasks, grading, compute, agent interface, interop and license.
- Memory servers for coding agents compared: m3 Memory vs agentmemory vs Basic Memory vs MCP Memory Service (Comparison): Four self-hosted memory servers that give Claude Code, Codex, Cursor and other MCP clients one shared memory across sessions and tools. Covers install, storage, search, how memories get captured, hosted options and license.
- OpenClaw vs Hermes Agent vs Pi: open-source agents you run yourself (Comparison): Three fast-moving open-source agent runtimes compared: OpenClaw (gateway-first personal assistant), Hermes Agent (self-improving agent with memory, skills and cron) and Pi (minimal, extensible coding harness). Covers interfaces, models, memory, skills, MCP, automation, safety defaults and license.
- Agent skill packs, skills CLIs and registries (Comparison): How Agent Skills are installed, discovered and shared across Claude Code, Codex, Gemini CLI, Cursor and Copilot, and how the main installers (skills CLI, plugin marketplaces) and skill packs compare on format, harness support, licence and install command.
- Terminal coding agents compared (Comparison): Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, OpenCode, Cline, goose and Aider compared on license, model access, instruction files, sandboxing, headless mode, MCP and Agent Skills support.
- Coding agent starter stack (Stack): A terminal coding agent plus current library docs, GitHub access, a real browser and a sandbox, connected over MCP, with the configuration choices that keep it safe.
- Connect a remote MCP server (Skill): Configure, verify and troubleshoot a remote Streamable HTTP MCP server in the major agent clients, including OAuth discovery and protocol-version checks.
- Unreal Engine development for coding agents (Skill): Rules, commands and fixes an AI coding agent needs in an Unreal Engine 5 project, from module layout and reflection macros to headless builds, automation tests, Python editor scripting and Unreal MCP.
Sources
- https://github.com/openai/codex
- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/mcp-server.md
Machine-readable
- JSON
- Markdown
- Source file on GitHub (edit via pull request)