OpenAI Codex
Set up Basic Memory with OpenAI Codex for persistent development knowledge and enhanced coding sessions
OpenAI Codex provides native support for Basic Memory through the Model Context Protocol (MCP), enabling persistent context across development sessions and building comprehensive coding knowledge.
Setup
Video Tutorial
Watch this quick guide to get started with Basic Memory and OpenAI Codex:
Configure Codex
Basic Memory works with Codex through MCP. Install it with:
codex mcp add basic-memory bash -c "uvx basic-memory mcp"
If you want to use a specific Basic Memory project, modify the command like so:
codex mcp add basic-memory bash -c "uvx basic-memory mcp --project your-project-name"
Verify Installation
Check that Basic Memory is configured correctly:
codex mcp list
You should see basic-memory
listed with the command bash -c uvx basic-memory mcp --project main
.
Quick Start
Once configured, you can immediately start using Basic Memory in your development workflow:
You: "Create a note about our authentication strategy for the API"
Codex: I'll document the authentication strategy we discussed...
[Creates structured note with technical details and rationale]
You: "Switch to my personal coding project"
Codex: [Changes context to personal project knowledge base]
MCP Integration Benefits
Codex’s native MCP support provides:
- Automatic tool access - No manual setup required
- Project-aware context - Maintains separate knowledge bases per project
- Real-time sync - Changes are immediately available
- Persistent memory - Context survives between sessions
- Structured knowledge - Uses Basic Memory’s semantic format
Available Tools
Through MCP, Codex can access all Basic Memory functionality:
- write_note - Create and update documentation
- read_note - Access existing knowledge and context
- search_notes - Find relevant information across projects
- edit_note - Update documentation incrementally
- recent_activity - Check what you’ve been working on
- project management - Switch between different knowledge bases
- build_context - Load conversation context from memory:// URLs
Integration with Development
Project Context
Basic Memory maintains separate knowledge bases for different projects:
You: "Switch to my work project"
Codex: [Loads work project context and knowledge]
You: "Based on our API design notes, what's the next step?"
Codex: [References existing documentation to provide contextual guidance]
Troubleshooting
Common Issues
Performance Tips
- Multiple projects: Use separate Basic Memory projects for different codebases
- Organized structure: Keep consistent folder organization across projects
- Regular cleanup: Archive old projects to maintain performance
Alternative Usage
If MCP isn’t working, you can still use Basic Memory:
CLI Integration
Use Basic Memory CLI tools from your terminal
File Editing
Edit Basic Memory notes directly and sync manually
Manual Context
Copy content from Basic Memory into conversations
Parallel Usage
Use Claude Desktop or other MCP clients alongside Codex. With Basic Memory they can see the same notes and share context.