CIE - Code Intelligence Engine
20+ MCP tools that give AI agents semantic code search, call graph analysis, and endpoint discovery — 100% local, indexes 100k LOC in seconds.
In practice: Tracing a call graph through MIE's codebase, Claude Code needed 34 tool calls without CIE. With CIE, it needed 3. Results vary by query, but structured code intelligence consistently reduces agent round-trips.
[](https://github.com/kraklabs/cie/actions/workflows/release.yml)
[](https://codecov.io/gh/kraklabs/cie)
[](https://goreportcard.com/report/github.com/kraklabs/cie)
[](go.mod)
[](LICENSE)
Quick Start •
Features •
Documentation •
Support
---
CIE indexes your codebase and provides semantic search, call graph analysis, and AI-powered code understanding through the Model Context Protocol (MCP).
## Why CIE?
- **Semantic Search** - Find code by meaning, not just text matching
- **Call Graph Analysis** - Trace execution paths including interface dispatch resolution
- **MCP Native** - Works seamlessly with Claude Code, Cursor, and any MCP client
- **Fast** - Indexes 100k LOC in seconds, queries in milliseconds
- **Private** - All data stays local, your code never leaves your machine
- **Accurate** - Keyword boosting ensures relevant results for function searches
## Installation
| Method | Command |
|--------|---------|
| **Homebrew** | `brew tap kraklabs/cie && brew install cie` |
| **Install Script** | `curl -sSL https://raw.githubusercontent.com/kraklabs/cie/main/install.sh \| sh` |
| **GitHub Releases** | [Download binary](https://github.com/kraklabs/cie/releases/latest) |
## Features
### Semantic Code Search
Find code by meaning, not keywords:
```bash
# Ask: "Where is authentication middleware?"
# Use cie_semantic_search tool via MCP
```
**Example output:**
```
[95%] AuthMiddleware (internal/http/auth.go:42)
[76%] ValidateToken (internal/auth/jwt.go:103)
```
### Call Graph Analysis
Trace how execution reaches any function:
```bash
# Question: "How does main() reach database.Connect()?"
# Use cie_trace_path tool
```
**Example output:**
```
main → InitApp → SetupDatabase → database.Connect
├─ File: cmd/server/main.go:25
├─ File: internal/app/init.go:42
└─ File: internal/database/setup.go:18
```
### HTTP Endpoint Discovery
List all API endpoints automatically:
```bash
# Use cie_list_endpoints tool
```
**Example output:**
```
[GET] /api/v1/users → HandleGetUsers
[POST] /api/v1/users → HandleCreateUser
[DELETE] /api/v1/users/:id → HandleDeleteUser
```
### Multi-Language Support
Supports Go, Python, JavaScript, TypeScript, and more through Tree-sitter parsers.
## Quick Start
### 1. Install the CLI
**Homebrew (macOS/Linux):**
```bash
brew tap kraklabs/cie
brew install cie
```
**Script:**
```bash
curl -sSL https://raw.githubusercontent.com/kraklabs/cie/main/install.sh | sh
```
**Manual download:**
Download from [GitHub Releases](https://github.com/kraklabs/cie/releases/latest)
### 2. Index Your Repository
```bash
cd /path/to/your/repo
cie init -y # Initialize project configuration
cie index # Index the codebase (works without Ollama too)
```
**Example output:**
```
Project: your-repo-name
Files: 1,234
Functions: 5,678
Types: 890
Last indexed: 2 minutes ago
```
> **Note:** CIE works without Ollama -- you'll have access to 20+ tools including grep, call graph, function finder, and more. Semantic search requires embeddings from Ollama or another provider.
### Management Commands
| Command | Description |
|---------|-------------|
| `cie init -y` | Initialize project configuration |
| `cie index` | Index (or re-index) the codebase |
| `cie reset --yes` | Delete all indexed data for the project |
### MCP Server Mode
CIE can run as an MCP server for integration with Claude Code:
```bash
cie --mcp
```
Configure in your Claude Code settings:
```json
{
"mcpServers": {
"cie": {
"command": "cie",
"args": ["--mcp"]
}
}
}
```
## Configuration
CIE uses a YAML configuration file (`.cie/project.yaml`):
```yaml
version: "1"
project_id: my-project
embedding:
provider: ollama
base_url: http://localhost:11434
model: nomic-embed-text
```
> **Embeddings are optional.** CIE works without Ollama or any embedding provider. You get full access to all structural tools (grep, call graph, function finder, etc.). Only semantic search (`cie_semantic_search`) requires embeddings.
You can also configure an LLM for `cie_analyze` narrative generation:
```yaml
# Optional: LLM for cie_analyze narrative generation
llm:
enabled: true
base_url: http://localhost:11434 # Ollama
model: llama3
# For OpenAI: base_url: https://api.openai.com/v1, model: gpt-4o-mini
```
**Note:** The `llm` section is optional. Without it, `cie_analyze` returns raw analysis data. With it configured, you get synthesized narrative summaries.
## MCP Tools
When running as an MCP server, CIE provides 20+ tools organized by category:
### Navigation & Search
| Tool | Description |
|------|-------------|
| `cie_grep` | Fast literal text search (no regex) |
| `cie_semantic_search` | Meaning-based search using embeddings |
| `cie_find_function` | Find functions by name (handles receiver syntax) |
| `cie_find_type` | Find types/interfaces/structs |
| `cie_find_similar_functions` | Find functions with similar names |
| `cie_list_files` | List indexed files with filters |
| `cie_list_functions_in_file` | List all functions in a file |
### Call Graph Analysis
| Tool | Description |
|------|-------------|
| `cie_find_callers` | Find what calls a function |
| `cie_find_callees` | Find what a function calls |
| `cie_trace_path` | Trace call paths from entry points to target |
| `cie_get_call_graph` | Get complete call graph for a function |
### Code Understanding
| Tool | Description |
|------|-------------|
| `cie_analyze` | Architectural analysis (LLM narrative optional) |
| `cie_get_function_code` | Get function source code |
| `cie_directory_summary` | Get directory overview with main functions |
| `cie_find_implementations` | Find types that implement an interface |
| `cie_get_file_summary` | Get summary of all entities in a file |
### HTTP/API Discovery
| Tool | Description |
|------|-------------|
| `cie_list_endpoints` | List HTTP/REST endpoints from common Go frameworks |
| `cie_list_services` | List gRPC services and RPC methods from .proto files |
### Security & Verification
| Tool | Description |
|------|-------------|
| `cie_verify_absence` | Verify patterns don't exist (security audits) |
### System
| Tool | Description |
|------|-------------|
| `cie_index_status` | Check indexing health and statistics |
| `cie_search_text` | Regex-based text search in function code |
| `cie_raw_query` | Execute raw CozoScript queries |
> **For detailed documentation of each tool with examples, see [Tools Reference](docs/tools-reference.md)**
## Data Storage
CIE stores indexed data locally in `