Overview
Codex is an AI coding assistant that supports Model Context Protocol integrations. With Orq MCP, you can manage your AI workflows directly from Codex while writing code.Prerequisites
- Codex installed
- Active Orq.ai account
- Orq.ai API key
Installation
Configure MCP Server
Add the Orq MCP server to your Codex configuration:- Open or create
~/.codex/config.toml - Add the Orq MCP server configuration:
- Set your API key as an environment variable:
Verify Installation
In Codex chat, type:Available Commands
Use natural language to ask Codex to perform these operations:Analytics
Analytics
Get analytics overview for my workspaceShow me workspace metrics for the last 7 daysQuery analytics filtered by deployment ID
Datasets
Datasets
Create a dataset called "customer-queries"List all datapoints in dataset [dataset-id]Add datapoints to dataset [dataset-id]Update datapoint [datapoint-id]Delete dataset [dataset-id]
Experiments
Experiments
Create an experiment from dataset [dataset-id]List all experiment runsExport experiment run [run-id] as CSVRun experiment and auto-evaluate results
Evaluators
Evaluators
Create an LLM-as-a-Judge evaluator for toneCreate a Python evaluator to check response lengthAdd evaluator to experiment [experiment-id]
Traces
Traces
List traces from the last 24 hoursShow me traces with errorsGet span details for trace [trace-id]Find the slowest traces from today
Models & Search
Models & Search
List all available AI modelsSearch for datasets named "customer"Find experiments in project [project-id]List registry keys for filtering traces
Usage Examples
Chat Commands
Use natural language to interact with Orq:- Generate 30 synthetic test case examples
- Use
create_datasetto create a new dataset named “API Integration Tests” - Use
create_datapointsto add all test cases to the dataset - Confirm creation with the dataset ID and summary
- Calculate the time range for the last 24 hours
- Use
list_traceswith error status filter - Display trace IDs, error messages, and timestamps
- Provide a summary of error types and frequency
- Search for the “user-feedback” dataset using
search_entities - Use
create_experimentwith two configurations (one for GPT-5.2, one for Claude Sonnet 4.6) - Run the experiment against all datapoints in the dataset
- Display the experiment ID and status
Code Context Integration
Codex can use Orq data while you’re coding:- Use
query_analyticswith deployment key filter for “recommendation-engine” - Set time range to the last 7 days
- Analyze metrics like request count, error rate, latency, and token usage
- Provide a summary report with trends and insights
Troubleshooting
Connection Issues
Connection Issues
- Verify the MCP endpoint URL
- Check your API key is valid
- Ensure network connectivity
- Review Codex logs for errors
Authentication Failures
Authentication Failures
- Confirm API key is valid
- Check API key permissions
- Try regenerating the API key
- Verify the Authorization header format
Tool Execution Errors
Tool Execution Errors
- Check the tool name is correct
- Verify required parameters are provided
- Review error messages in Codex
- Consult MCP tools list