This guide shows how to connect Context Engine MCP to common clients:
- Codex CLI
- Claude Code
- Antigravity
- Claude Desktop
- Cursor
- Build the server first:
npm install
npm run build- Identify the server entrypoint path:
- Server entrypoint:
/absolute/path/to/context-engine/dist/index.js
Windows example path:
D:\GitProjects\context-engine\dist\index.js
For repo-aware startup, most clients can use this one-time registration command:
node /absolute/path/to/context-engine/dist/index.jsTransport is stdio (not HTTP).
Context Engine resolves the workspace at startup like this:
- explicit
--workspaceoverride - current working directory
- nearest parent git root when launched from a nested repo folder
- current working directory with a warning when no git root is found
Use --workspace /path/to/your/project only when your client launches MCP servers from the wrong folder or you want to force a different workspace.
- First-time setup: Register the MCP server once in the MCP client.
- Daily use: Open a repo and let the server resolve the workspace automatically.
- Override when needed:
Add
--workspacefor unusual layouts, monorepos, or clients that do not launch from the repo you expect.
Startup and indexing are now separate states:
- the server can come up first
- if the workspace is missing an index or the index is stale, background indexing starts automatically
- the first query may still be slower until indexing finishes
Operator override:
- disable startup auto-index with
CE_AUTO_INDEX_ON_STARTUP=false - run
index_workspacemanually if you prefer explicit control
The context-engine-mcp wrapper is just a small starter that launches the same server for you.
Use the wrapper when you want a shorter command or an easier install path.
Use node /absolute/path/to/context-engine/dist/index.js directly when your client already supports a custom command and you want the simplest setup.
The wrapper does not add new features, change search results, or replace the server itself. It is only for convenience.
Add server once:
codex mcp add context-engine -- node /absolute/path/to/context-engine/dist/index.jsWindows:
codex mcp add context-engine -- node "D:\GitProjects\context-engine\dist\index.js"Verify:
codex mcp listAdd server once:
claude mcp add context-engine -- node /absolute/path/to/context-engine/dist/index.jsWindows:
claude mcp add context-engine -- node "D:\GitProjects\context-engine\dist\index.js"Verify:
claude mcp listIf your installed Claude Code version uses slightly different subcommand syntax, check:
claude mcp --helpConfig file locations:
- macOS:
~/Library/Application Support/Antigravity/config.json - Windows:
%APPDATA%\Antigravity\config.json - Linux:
~/.config/antigravity/config.json
Config example:
{
"mcpServers": {
"context-engine": {
"command": "node",
"args": [
"/absolute/path/to/context-engine/dist/index.js"
]
}
}
}Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Config example:
{
"mcpServers": {
"context-engine": {
"command": "node",
"args": [
"/absolute/path/to/context-engine/dist/index.js"
]
}
}
}Config file locations:
- macOS/Linux:
~/.cursor/mcp.json - Windows:
%USERPROFILE%\.cursor\mcp.json
Config example:
{
"mcpServers": {
"context-engine": {
"command": "node",
"args": [
"/absolute/path/to/context-engine/dist/index.js"
]
}
}
}Keep the explicit workspace override if:
- your MCP client launches from a fixed home directory instead of the repo
- you want to point one client entry at a specific repo on purpose
- you are working inside a monorepo and want a narrower subtree
Example:
codex mcp add context-engine -- node "D:\GitProjects\context-engine\dist\index.js" --workspace "D:\GitProjects\your-project"After setup and restart:
- Confirm
context-engineappears in your MCP client. - Confirm tool list is visible.
- Run one quick prompt, for example: "use
semantic_searchto find authentication logic". - If startup says indexing is running, wait for it to finish or trigger
index_workspacemanually.