Connect a client
Add Context Engine to Codex, Claude Code, Cursor, and Google Antigravity IDE.
Context Engine runs as a local stdio MCP server. The client starts context-engine serve and supplies your API key through CONTEXT_ENGINE_API_KEY.
For Codex, Claude Code, and Cursor, put the key in your shell profile:
export CONTEXT_ENGINE_API_KEY="<your key>"Keep the key private and do not commit it in a workspace configuration.
Claude Code
Register Context Engine from the command line:
claude mcp add context-engine -- context-engine serveClaude Code inherits CONTEXT_ENGINE_API_KEY from your environment.
Cursor
Add Context Engine to your Cursor MCP configuration:
{
"mcpServers": {
"context-engine": {
"command": "context-engine",
"args": ["serve"],
"env": {
"CONTEXT_ENGINE_API_KEY": "${env:CONTEXT_ENGINE_API_KEY}"
}
}
}
}The configuration reads the key from your environment rather than storing it in the file.
Codex
Add Context Engine to your Codex configuration:
[mcp_servers.context-engine]
command = "context-engine"
args = ["serve"]
env_vars = ["CONTEXT_ENGINE_API_KEY"]Codex forwards the named variable from its environment to Context Engine.
Google Antigravity IDE
In Antigravity IDE, open … → MCP Servers → Manage MCP Servers → View raw config. Add the server to the global ~/.gemini/config/mcp_config.json file:
{
"mcpServers": {
"context-engine": {
"command": "context-engine",
"args": ["serve"],
"env": {
"CONTEXT_ENGINE_API_KEY": "<your key>"
}
}
}
}Save the file, then refresh MCP servers. Antigravity receives the literal value as CONTEXT_ENGINE_API_KEY, so use the global file to prevent the key from being committed with a workspace.