# Codex CLI Configuration Example for Context Engine MCP Server
#
# This file shows how to configure Codex CLI to use the Context Engine MCP Server.
# Copy the relevant sections to your ~/.codex/config.toml file.
#
# For full Codex CLI configuration options, see:
# https://developers.openai.com/codex/mcp/
# https://github.com/openai/codex/blob/main/docs/config.md
# ==============================================================================
# MCP SERVER CONFIGURATION
# ==============================================================================
# Context Engine MCP Server
# This server provides semantic code search and context enhancement capabilities
[mcp_servers.context-engine]
# Command to run the MCP server (use the full path to node and the server)
command = "node"
# Arguments for the server
# Replace /path/to/context-engine with the actual path to this project
# Replace /path/to/your/workspace with the path to your code repository
args = [
"/path/to/context-engine/dist/index.js",
"--workspace",
"/path/to/your/workspace"
]
# Optional: Environment variables for the server
[mcp_servers.context-engine.env]
# If using environment variable authentication instead of auggie login
# AUGMENT_API_TOKEN = "your-token-here"
# AUGMENT_API_URL = "https://api.augmentcode.com"
# Optional: Server timeouts
# startup_timeout_sec = 30
# tool_timeout_sec = 120
# Optional: Enable/disable specific tools
# enabled_tools = ["semantic_search", "get_file", "get_context_for_prompt"]
# disabled_tools = []
# ==============================================================================
# WINDOWS EXAMPLE
# ==============================================================================
# For Windows users, use this configuration instead:
# [mcp_servers.context-engine]
# command = "node"
# args = [
# "D:\\GitProjects\\context-engine\\dist\\index.js",
# "--workspace",
# "D:\\GitProjects\\your-project"
# ]
# ==============================================================================
# ALTERNATIVE: ADD VIA CLI
# ==============================================================================
#
# Instead of editing config.toml directly, you can use the Codex CLI:
#
# codex mcp add context-engine -- node /path/to/context-engine/dist/index.js --workspace /path/to/your/workspace
#
# This will automatically add the MCP server configuration to your config.toml
# ==============================================================================
# MULTIPLE WORKSPACES EXAMPLE
# ==============================================================================
# You can configure multiple instances for different workspaces:
# [mcp_servers.context-engine-frontend]
# command = "node"
# args = [
# "/path/to/context-engine/dist/index.js",
# "--workspace",
# "/path/to/frontend-project"
# ]
# [mcp_servers.context-engine-backend]
# command = "node"
# args = [
# "/path/to/context-engine/dist/index.js",
# "--workspace",
# "/path/to/backend-project"
# ]
# ==============================================================================
# TIPS
# ==============================================================================
#
# 1. Make sure to build the project first: npm run build
# 2. Ensure you're authenticated with Auggie: auggie login
# 3. Index your workspace before first use:
# node dist/index.js --workspace /your/project --index
# 4. Use absolute paths for reliability
# 5. After modifying config.toml, restart Codex CLI
#
# To verify MCP servers are connected, run: codex
# Then use the /mcp command in the TUI to see connected servers