MCP Server Configuration
Prerequisites
- An Okareo API Token
- Python 3.10–3.12
- An MCP-ready editor (Claude Code, Cursor, Cline, GitHub Copilot, Windsurf, etc.)
Setup
Add the following MCP configuration to your editor's config file (e.g., .mcp.json for Claude Code, .cursor/mcp.json for Cursor):
{
"mcpServers": {
"okareo": {
"command": "uvx",
"args": ["okareo-mcp"]
}
}
}
Setting your API key
You can provide OKAREO_API_KEY in two ways:
Option 1 — OS-level environment variable
Set the variable in your shell profile before launching your editor:
# Add to your ~/.zshrc, ~/.bashrc, or equivalent
export OKAREO_API_KEY="<YOUR_API_KEY>"
Then restart your terminal and relaunch your editor so it inherits the updated environment.
Option 2 — Inline in the MCP configuration
Pass the key directly in the env block of your MCP config:
{
"mcpServers": {
"okareo": {
"command": "uvx",
"args": ["okareo-mcp"],
"env": {
"OKAREO_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
Claude Code supports ${...} interpolation in its MCP config, so you can use "OKAREO_API_KEY": "${OKAREO_API_KEY}" to reference an existing environment variable. Other editors do not support this syntax — use a literal key value or the OS environment approach instead.
Provider API Keys
The MCP server automatically detects LLM provider API keys from your environment (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY, COHERE_API_KEY) and injects them into evaluations. Set these the same way as OKAREO_API_KEY — as OS-level environment variables.
Environment Variables
| Variable | Default | Description |
|---|---|---|
OKAREO_API_KEY | (required) | Your Okareo API token |
OKAREO_BASE_URL | https://api.okareo.com | Custom backend URL (on-prem deployments) |
Verifying the Connection
After setup, ask your copilot to list your Okareo projects or scenarios to confirm the MCP server is working:
"List my Okareo scenarios."
If the server is configured correctly, you'll see your existing scenarios. If not, check the Troubleshooting section in the MCP reference.