Codex Integration
Codex is OpenAI’s coding agent with built-in MCP support. You can register Cognee MCP once, then use Cognee memory and retrieval tools directly in your Codex sessions.Prerequisites
- Codex CLI installed and authenticated
- Cognee MCP server running (see Quickstart or Local Setup)
- OpenAI API key (for Cognee’s LLM operations)
Setup Steps
1
Add Cognee MCP Server
Choose the command that matches how you started the Cognee MCP server:If a
- Docker (HTTP)
- Local (stdio)
Use this if you started the server with Docker:
cognee server entry already exists, remove it first:2
Verify Server Registration
cognee in the MCP server list.3
Start Codex and Use Cognee Tools
- “Remember this repository note in Cognee: the billing API uses Stripe webhooks for subscription updates”
- “Recall authentication logic from Cognee before editing this file”
- “Improve the current Cognee dataset with the architecture notes in this repository”
- “Use Cognee to find prior decisions about database migrations”
Where to Use This Configuration
Codex stores MCP server settings in~/.codex/config.toml under the mcp_servers section. Once added, the Cognee server is available to Codex sessions unless removed or disabled.
You can also configure the mcp server directly in the config.toml file.
Need Help?
Join Our Community
Get support and connect with other developers using Cognee MCP.