AGENTS.md give Codex persistent context about your documentation standards, components, and style guide.
Getting started
Prerequisites:- An OpenAI account with access to Codex
- Install the Codex CLI:
- Navigate to your docs directory.
- (Optional) Add the
AGENTS.mdfile below to your project. - Run
codexto start a session.
Install the Mintlify skill and MCP servers for AI coding tools.
Use Codex with Mintlify
Codex readsAGENTS.md files from your repository to understand project-specific rules and conventions before it starts working. You can place an AGENTS.md at the root of your docs repo to give Codex context about Mintlify components, your writing standards, and how you structure your documentation.
Codex discovers AGENTS.md files at multiple levels:
- Global instructions in
~/.codex/AGENTS.mdapply to all your projects. - Project instructions in your repo root (or any subdirectory) apply to work done in that scope.
AGENTS.md at the root of your docs repo and commit it so all contributors benefit from the same context. See AGENTS.md in the Codex documentation for complete details.
Example AGENTS.md
This file gives Codex context about Mintlify components and technical writing standards. Customize it for your documentation:- Writing standards: Update language guidelines to match your style guide.
- Component patterns: Add project-specific components or modify existing examples.
- Code examples: Replace generic examples with real API calls and responses for your product.
- Style and tone preferences: Adjust terminology, formatting, and other rules.
AGENTS.md at the root of your docs repo.
AGENTS.md
Working with Codex
Once yourAGENTS.md is in place, Codex picks it up automatically when you start a session in your docs repo.
Example prompts
Writing new content:Enhance with MCP server
Connect the Mintlify MCP server to Codex to give it access to search the Mintlify documentation while helping you write. When you connect the MCP server, Codex can look up component usage and configuration options without you leaving the terminal. Add the MCP server to your global Codex config at~/.codex/config.toml. Create the file if it does not exist:
codex session for the config change to take effect. To confirm the MCP server is connected, ask Codex Which MCP servers do you have access to? — it should list the entry you just added.
Using config.toml registers the MCP server for every Codex session on your machine. The in-session skill and MCP prompt shown earlier loads the same context on demand for a single session — use it for a one-off run or when you can’t edit config.toml.
See Model Context Protocol for more information about MCP servers and how to find your site’s MCP endpoint.