Skip to content

Codex

OpenAI Codex CLI is OpenAI’s agentic coding tool. devai:install configures it with an AGENTS.md project guidelines file, MCP server registration via the codex mcp add CLI, and Marko skills distributed to .agents/skills/.

  • Codex CLI installed: npm install -g @openai/codex
  • Authenticated: codex auth login
  • marko/devai installed (see Installation)

Running marko devai:install with Codex detected produces the following:

AGENTS.md # Project guidelines for Codex
.agents/skills/ # Marko skill files distributed for Codex

MCP registration is performed via the Codex CLI (codex mcp add) rather than by writing a config file.

The root AGENTS.md receives Marko project guidelines inside a <!-- BEGIN/END marko:devai --> marker block: created if absent, and on later runs only the marked region is refreshed, so anything you add outside the markers is preserved. Remove the markers to take full ownership — devai then leaves the file alone (see Editing generated files). It contains:

  • Marko module conventions and project structure overview
  • Available MCP tools and their descriptions
  • Project-specific guidelines from every installed package’s resources/ai/guidelines.md

The installer calls codex mcp add <serverName> -- <command> [args] to register marko mcp:serve as an MCP server. Codex stores this registration in its own configuration; no .codex/mcp.json file is written by devai:install.

Marko skill bundles are written to .agents/skills/ so Codex can reference them during agentic tasks.

  1. Open a terminal in your project root.
  2. Run codex "What Marko MCP tools are available?" — Codex should list the registered tools from marko/mcp.
  3. Run codex "Search docs for routing" — the search_docs tool should return Marko documentation results.
  4. Verify AGENTS.md exists in the project root and .agents/skills/ contains skill files.
  • Full-auto mode: Codex works well in --full-auto mode for routine Marko tasks like generating module boilerplate. The validate_module MCP tool helps it self-check generated code.
  • Skills as tasks: Marko skills in resources/ai/skills/ map naturally to Codex task descriptions. Reference a skill by name in your prompt to load its context.
  • Sandboxing: When running with network sandboxing, ensure marko mcp:serve is allowed through since it communicates over stdio.