MCP server for Optiq Context Engine - semantic code search and retrieval
npm install @optiqcode/context-engine-mcpbash
npm install -g @optiqcode/context-engine-mcp
`
Or use with npx:
`bash
npx @optiqcode/context-engine-mcp
`
Configuration
Environment variables:
- OPTIQ_ENGINE_URL: URL of the UPCCE engine (defaults to http://localhost:8000)
Running the UPCCE Engine
The MCP server connects to the UPCCE Python backend. Start it first:
`bash
cd UUEC
pip install -e .
python -m upcce --port 8000
`
Usage with Claude Desktop
Add to your claude_desktop_config.json:
`json
{
"mcpServers": {
"optiq-context-engine": {
"command": "npx",
"args": ["@optiqcode/context-engine-mcp"],
"env": {
"OPTIQ_ENGINE_URL": "http://localhost:8000"
}
}
}
}
`
Usage with Kiro
Add to .kiro/settings/mcp.json:
`json
{
"mcpServers": {
"optiq-context-engine": {
"command": "npx",
"args": ["@optiqcode/context-engine-mcp"],
"env": {
"OPTIQ_ENGINE_URL": "http://localhost:8000"
},
"disabled": false
}
}
}
`
Available Tools
$3
Semantic search for code entities across your codebase with full content retrieval.
Parameters:
- query (required): Natural language search query (e.g., "authentication functions", "database connection code")
- repository_id (required): Repository ID from Optiq (e.g., d1b8bd23aa4c31b3)
- limit (optional): Maximum number of results (default: 10, max: 20)
- min_confidence (optional): Minimum confidence threshold (0-1, defaults to 0.5)
- intent (optional): Query intent to optimize search strategy. One of:
- definition - Find where something is defined/declared
- usage - Find where something is used/called
- flow - Understand how something works end-to-end
- debug - Find error/exception handling code
- impact - Find what depends on something
- general - General code search (default)
Example:
`
Find all authentication functions in /Users/you/projects/myapp
`
Features:
- Returns full code content for top results
- Includes AI guidance on how to use the results
- Provides confidence scores for each result
- Shows exact file locations and line numbers
Note: You must first index your repository using the Optiq CLI (npm install -g @optiqcode/cli).
Development
`bash
Install dependencies
npm install
Build
npm run build
Run locally
npm start
``