Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt

Use this file to discover all available pages before exploring further.

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:
Use this if you started the server with Docker:
codex mcp add cognee --url http://localhost:8000/mcp
If a cognee server entry already exists, remove it first:
codex mcp remove cognee
2

Verify Server Registration

codex mcp list
You should see cognee in the MCP server list.
3

Start Codex and Use Cognee Tools

codex
Codex can now call Cognee tools automatically when relevant. You can also ask explicitly:
  • “Store this in Cognee memory”
  • “Search Cognee for auth implementation patterns”

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.