Skip to main content
This guide shows you how to configure the Sita MCP server in Codex CLI to enable powerful codebase Q&A capabilities.
You must configure the MCP server for each repository you want to work with. Each repository requires its own configuration section with a unique repo ID.
Important: Codex CLI uses mcp_servers (with underscore) as the top-level key, not mcpServers like JSON-based tools.

Configuration Steps

1

Locate Configuration File

Open the Codex CLI configuration file located at:
Create this file if it doesn’t exist.
2

Add MCP Server Configuration

Add an mcp_servers section to your TOML configuration file.
3

Configure Sita Server

Add the Sita MCP server configuration using TOML format (see examples below).
4

Save and Restart

Save the configuration file. The MCP server will be available next time you use Codex CLI.

Single Repository Configuration

To configure Sita for a single repository, add this to your ~/.codex/config.toml:
Replace YOUR_REPO_ID with your repository ID. The repo id can be copied from repos tab.

Multiple Repository Configuration

To configure multiple repositories, add separate server entries for each:
Give each server configuration a descriptive name (like frontend-qna, backend-qna) to easily identify which repository it connects to.

Using Environment Variables

You can use an environment variable for the repo ID with the env field:

Create Configuration via Command Line

You can create the configuration file with this command:
Then edit the file to add your actual repository ID:

Verification

After adding the configuration:
  1. Save the ~/.codex/config.toml file
  2. Run Codex CLI with a query about your codebase
  3. The MCP server tools should be available for use
If you encounter a “string does not match pattern” error, it may indicate a compatibility issue between the MCP server’s tool naming convention and Codex CLI’s validation rules. Contact support if this occurs.

Next Steps

  • Set up MCP in Claude Code for CLI integration
  • Configure Cursor with MCP support
  • Try Cline for VSCode integration