Skip to main content
Welcome to the Codex integration guide. This guide will help you connect ByteRover with Codex CLI, providing persistent memory of your coding patterns and solutions.
This configuration works for both the Codex CLI and Codex Extension, as they share the same configuration file.

What You’ll Need

  • Codex installed and configured
  • A ByteRover account

Getting Started

1. Start the Connection

Go to your ByteRover dashboard and:
  1. Find the “Connect your agent” section
  2. Click on Codex from the list
  3. Hit the “Connect with Codex” button

2. Connect ByteRover to Codex

Step 1: Open your Codex configuration file:
~/.codex/config.toml
Step 2: Add the MCP server configuration:
[mcp_servers.byterover-mcp]
command = "npx"
args = [
  "-y",
  "mcp-remote",
  "https://mcp.byterover.dev/v2/mcp",
  "--header",
  "Authorization: Bearer [DASHBOARD_TOKEN]"
]
Step 3: Restart Codex to apply changes.

3. Check It’s Working

In Codex CLI, run /mcp in Codex to confirm your connection. You should see byterover-mcp listed with available tools.

Test It

Try storing a pattern:
Store this date formatting function to ByteRover:

function formatDate(date, format = 'YYYY-MM-DD') {
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0');
  const day = String(date.getDate()).padStart(2, '0');
  return format
    .replace('YYYY', year)
    .replace('MM', month)
    .replace('DD', day);
}
Codex should confirm successful storage.

Benefits

Codex gains memory of your coding style and patterns, providing more relevant and personalized assistance based on your development history.
Your stored knowledge persists across all sessions, building a comprehensive personal coding knowledge base over time.
With ByteRover team plans, your entire team can benefit from shared coding patterns and solutions discovered by any team member.

Troubleshooting

Verify TOML syntax in config file. Check API token accuracy. Ensure file permissions allow reading/writing to ~/.codex/config.toml.
Test internet connectivity. Verify MCP server URL is correct. Try regenerating API token if connection fails.
Confirm /mcp shows connected status. Test with simple storage command. Check ByteRover account has available operations.

Best Practices

Be descriptive when storing code:
"Store this authentication middleware pattern for Express.js"
"Save this React custom hook for API calls"
Leverage Codex’s capabilities for complex pattern storage:
"Analyze this component and store the error boundary pattern"
"Save this database migration strategy for future reference"
Ask Codex to search your ByteRover memory:
"Find my stored authentication patterns from ByteRover"
"Retrieve database connection examples from ByteRover memory"

What’s Next?

Continue using Codex, now enhanced with ByteRover’s persistent memory. Store useful patterns and solutions as you code. Codex will become increasingly personalized and effective at understanding your development style.
Join our Discord community for Codex tips and support.