Logo di CIE - Code Intelligence Engine

CIE - Code Intelligence Engine

Organizzazione
kraklabs

Code Intelligence Engine — indexes your codebase and gives AI assistants deep understanding via MCP (semantic search, call graphs, 20+ tools)

Autorekraklabs
Repositorycie
LinguaGo
Fork
6
Stelle
19
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaAGPL-3.0
Link
  • Collega gli strumenti ai flussi di lavoro IA

    CIE - Code Intelligence Engine mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    19 stelle e 6 fork nel repository collegato.

Release codecov Go Report Card Go Version License


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

MethodCommand
Homebrewbrew tap kraklabs/cie && brew install cie
Install Scriptcurl -sSL https://raw.githubusercontent.com/kraklabs/cie/main/install.sh | sh
GitHub ReleasesDownload binary

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

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

CommandDescription
cie init -yInitialize project configuration
cie indexIndex (or re-index) the codebase
cie reset --yesDelete 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

ToolDescription
cie_grepFast literal text search (no regex)
cie_semantic_searchMeaning-based search using embeddings
cie_find_functionFind functions by name (handles receiver syntax)
cie_find_typeFind types/interfaces/structs
cie_find_similar_functionsFind functions with similar names
cie_list_filesList indexed files with filters
cie_list_functions_in_fileList all functions in a file

Call Graph Analysis

ToolDescription
cie_find_callersFind what calls a function
cie_find_calleesFind what a function calls
cie_trace_pathTrace call paths from entry points to target
cie_get_call_graphGet complete call graph for a function

Code Understanding

ToolDescription
cie_analyzeArchitectural analysis (LLM narrative optional)
cie_get_function_codeGet function source code
cie_directory_summaryGet directory overview with main functions
cie_find_implementationsFind types that implement an interface
cie_get_file_summaryGet summary of all entities in a file

HTTP/API Discovery

ToolDescription
cie_list_endpointsList HTTP/REST endpoints from common Go frameworks
cie_list_servicesList gRPC services and RPC methods from .proto files

Security & Verification

ToolDescription
cie_verify_absenceVerify patterns don't exist (security audits)

System

ToolDescription
cie_index_statusCheck indexing health and statistics
cie_search_textRegex-based text search in function code
cie_raw_queryExecute raw CozoScript queries

For detailed documentation of each tool with examples, see Tools Reference

Data Storage

CIE stores indexed data locally in <local_data_dir>/<project_id>/ (default: ~/.cie/data/<project_id>/) using embedded CozoDB with RocksDB backend. This ensures:

  • Your code never leaves your machine
  • Fast local queries
  • Persistent index across sessions

Embedding Providers

CIE supports multiple embedding providers:

ProviderConfiguration
OllamaOLLAMA_HOST, OLLAMA_EMBED_MODEL
OpenAIOPENAI_API_KEY, OPENAI_EMBED_MODEL
NomicNOMIC_API_KEY

Documentation

GuideDescription
Getting StartedStep-by-step tutorial from installation to first query
ConfigurationComplete configuration reference
Tools ReferenceAll 20+ MCP tools with examples
ArchitectureHow CIE works internally
MCP IntegrationSetting up with Claude Code, Cursor
Migration GuideMigrating from Docker to embedded mode
Testing GuideRunning tests and adding new tests
BenchmarksPerformance data and tuning
Exit CodesCLI exit codes for scripting
TroubleshootingCommon issues and solutions

Architecture

CIE uses an embedded architecture -- a single binary handles indexing, querying, and MCP serving with no external services required:

┌──────────────────────────────────────────────────────────────┐
│  Host Machine                                                 │
│  ┌──────────────────────────────────────────────────────┐    │
│  │  CLI `cie`                                            │    │
│  │  - cie init   → Creates .cie/project.yaml            │    │
│  │  - cie index  → Parses code, writes to local CozoDB  │    │
│  │  - cie --mcp  → Reads from local CozoDB              │    │
│  │                                                       │    │
│  │  Data: <local_data_dir>/<project>/ (RocksDB)         │    │
│  └──────────────────────────────────────────────────────┘    │
│                                                               │
│  ┌──────────────┐  (optional)                                │
│  │   Ollama     │  For semantic search embeddings            │
│  │  :11434      │  Install: brew install ollama              │
│  └──────────────┘  Model: nomic-embed-text                   │
└──────────────────────────────────────────────────────────────┘

Key Components:

  • CIE CLI: Single binary handles indexing, querying, and MCP serving
  • CozoDB + RocksDB: Embedded database stored locally at <local_data_dir>/<project> (default ~/.cie/data/<project>)
  • Ollama (optional): Local embedding generation for semantic search
  • Tree-sitter: Code parsing for Go, Python, JS, TS

Code Structure:

cie/
├── cmd/cie/           # CLI tool with init, index, query, MCP commands
├── pkg/
│   ├── ingestion/     # Tree-sitter parsers and indexing pipeline
│   ├── tools/         # 20+ MCP tool implementations
│   ├── llm/           # LLM provider abstractions (OpenAI, Ollama)
│   ├── cozodb/        # CozoDB wrapper for Datalog queries
│   └── storage/       # Storage backend interface
└── docs/              # Documentation

For in-depth architecture details, see Architecture Guide.

Development

Testing

bash
# Run all tests
go test ./...

# Run with short flag
go test -short ./...

# Run integration tests with CozoDB
go test -tags=cozodb ./...

For detailed testing documentation, see docs/testing.md.

Writing Tests

Use the CIE testing helpers for easy test setup:

go
import cietest "github.com/kraklabs/cie/internal/testing"

func TestMyFeature(t *testing.T) {
    backend := cietest.SetupTestBackend(t)
    cietest.InsertTestFunction(t, backend, "func1", "MyFunc", "file.go", 10, 20)

    result := cietest.QueryFunctions(t, backend)
    require.Len(t, result.Rows, 1)
}

Building

bash
# Build all commands
make build-all

# Format code
make fmt

# Run linter
make lint

Support

Need help or want to contribute?

Before opening an issue:

  1. Check the troubleshooting guide
  2. Search existing issues
  3. Include CIE version: cie --version
  4. Provide minimal reproduction steps

Contributing

See CONTRIBUTING.md for guidelines.

CIE Enterprise

Scale code intelligence across your entire organization.

CIE Enterprise brings the power of semantic code search and call graph analysis to teams of any size. Built for organizations that demand reliability, security, and collaboration.

Why Enterprise?

FeatureOpen SourceEnterprise
Semantic Search✅✅
Call Graph Analysis✅✅
Local Embeddings (768 dim)✅✅
Distributed Architecture—✅
Team Collaboration—✅
CI/CD Integration—✅
High-Fidelity Embeddings (1536 dim)—✅
Integrated LLMs—✅
Priority Support—✅

Enterprise Features

Distributed Architecture Deploy CIE across your infrastructure with a Primary Hub and Edge Caches. All team members connect to the same indexed codebase with millisecond-latency queries worldwide.

Team Collaboration Share code intelligence across your entire engineering organization. One index, one source of truth—no more siloed knowledge.

CI/CD Integration Automatically keep your code index up-to-date with every commit. Native integration with GitHub Actions, GitLab CI, Jenkins, and more.

High-Fidelity Embeddings OpenAI-powered 1536-dimension embeddings for superior semantic search accuracy. Find exactly what you're looking for, even in massive codebases.

Integrated LLMs Connect your preferred LLM provider for enhanced code analysis, architectural insights, and natural language queries about your codebase.

Priority Support Direct access to our engineering team. SLAs, dedicated support channels, and implementation assistance.

Get Started

Contact us: enterprise@kraklabs.com

Schedule a demo to see how CIE Enterprise can transform your team's development workflow.


License

CIE is dual-licensed:

Open Source License (AGPL v3)

CIE is free and open source under the GNU Affero General Public License v3.0 (AGPL v3).

Use CIE for free if:

  • You're building open source software
  • You can release your modifications under AGPL v3
  • You're okay with the copyleft requirements

See LICENSE for full AGPL v3 terms.

Commercial License

Need to use CIE in a closed-source product or service? We offer commercial licenses that remove AGPL requirements.

Commercial licensing is right for you if:

  • You want to use CIE in a proprietary product
  • You want to offer CIE as a managed service without releasing your code
  • Your organization's policies prohibit AGPL-licensed software
  • You want to modify CIE without releasing your modifications

Pricing: Contact licensing@kraklabs.com for details.

See LICENSE.commercial for more information.

Why dual licensing? This model allows us to:

  • Keep CIE free for the open source community
  • Ensure improvements benefit everyone through AGPL's copyleft
  • Sustainably fund development through commercial licensing
  • Enable enterprise adoption without legal concerns

Third-Party Components

CIE includes some third-party components with their own licenses:

These components are compatible with AGPL v3 and retain their original licenses.

Related Projects

  • CozoDB - The embedded database powering CIE
  • Tree-sitter - Parser generator for code analysis
  • MCP - Model Context Protocol specification

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "kraklabs-cie": {
      "command": "",
      "args": []
    }
  }
}

Usa MCP CIE - Code Intelligence Engine con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso CIE - Code Intelligence Engine, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi CIE - Code Intelligence Engine come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di CIE - Code Intelligence Engine.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "kraklabs-cie": {
      "command": "npx",
      "args": [
        "-y",
        "cie"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di CIE - Code Intelligence Engine, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di CIE - Code Intelligence Engine.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare CIE - Code Intelligence Engine per aiutarmi con questa attività?
CIE - Code Intelligence Engine
Certo. Ho letto.
Ecco cosa ho trovato con CIE - Code Intelligence Engine.

Domande frequenti

A cosa serve il server MCP CIE - Code Intelligence Engine?

CIE - Code Intelligence Engine è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare CIE - Code Intelligence Engine MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare CIE - Code Intelligence Engine con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP CIE - Code Intelligence Engine con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando CIE - Code Intelligence Engine, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego CIE - Code Intelligence Engine MCP a TypingMind?

CIE - Code Intelligence Engine funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre CIE - Code Intelligence Engine MCP in TypingMind?

CIE - Code Intelligence Engine mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare CIE - Code Intelligence Engine MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se CIE - Code Intelligence Engine richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇