CodeIndex
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π§ CodeIndex
CodeIndex is like a "Search Engine & Memory" for your software code. It lives entirely on your own computer, keeping your data private while making your code understandable for AI tools.
π What does it actually do?
Imagine your code is a massive library with thousands of books.
The Search Problem: Normally, if you ask an AI "How do I log in?", it has to guess where to look. It's like a librarian who has never seen your library before.
The CodeIndex Solution: CodeIndex builds a digital map of your entire library.
π Smart Search: You can ask questions in plain English ("Where is the payment logic?"), and it finds the exact spot immediately.
π§ It Remembers: It keeps a record of what you've found or analyzed before, so the AI doesn't forget context halfway through a project.
π» 100% Local: Everything happens on your machine. No code is ever sent to a third-party server for indexing.

π Table of Contents
100% Local & Private
Zero-Latency Embeddings: Uses a deterministic local hash-based embedding engine.
Zero Cost: No external API calls or token fees for indexing.
Hardware Agnostic: Optimized for CPU performance (including Apple Silicon). No GPU required.
Local Sovereignty: Everything happens on your machine via SQLite and
sqlite-vec.

Related MCP server: CodeIntel MCP Server
π Key Features
π Semantic & Hybrid Search
Local Vectors: Powered by
sqlite-vecorsqlite-vssfor blazing-fast local similarity search.Hybrid Mode: Combines semantic meaning with exact symbol matching to ensure "find auth logic" works as well as "find
LoginController".Compact Snippets: Returns context-stripped results to maximize token efficiency for LLM prompts.
β‘ Professional Code Intelligence (analyze)
Go beyond simple grep. Use the integrated analysis engine to query:
Multi-Language AST: Deep structural analysis for Python, JavaScript, TypeScript, Go, Rust, Java, C, and C++ (powered by Tree-sitter).
Dependency Graphs: Map imports and relationship chains across files.
Complexity Metrics: Identify technical debt and hotspots automatically.
Usage Scanning: Find every reference to a symbol across the entire repo.
πΎ Persistent Project Memory
The memory_* subsystem records your development journey.
Session Tracking: Organize work into coherent sessions for long-running feature implementations.
πΊοΈ Cognitive Code Map (Visualizer)
The viewer subsystem provides a rich, interactive dashboard for your codebase.
Force-Directed Graph: Visualize the relationships between files, symbols, and citations.
Semantic Playground: Test your RAG queries in real-time and see exactly which parts of your code are being referenced.
Real-time Activity: Monitor background indexing and memory capture via a live event stream.
π¦ Installation
Requirements
Python
3.10or higherWindows, macOS, or Linux
Setup
# Create and activate environment
python -m venv .venv
source .venv/bin/activate # Or .venv\Scripts\Activate.ps1 on Windows
# Install core package
pip install -e .
# Install analysis dependencies (recommended)
pip install -e ".[analysis]"π οΈ Quick Start
1. Initialize and Sync
Initialize your project and perform the first indexing pass.
codeindex init --path . --workspace my-project
codeindex sync --watch2. Powerful Querying
# Semantic search
codeindex query "how is user authentication handled?" --mode hybrid
# Deep AST analysis
codeindex analyze ast --node-type ClassDef --name-contains Controller3. Start the Intelligence Server
Expose all tools to your favorite AI agent via MCP.
codeindex serve --port 9090ποΈ Architecture
CodeIndex is built as a modular pipeline that moves code from disk to an actionable memory layer.
graph TD
A[Disk: Source Code] --> B[Indexer: AST & Chunks]
B --> C[(SQLite: Index DB)]
C --> D[Search: Semantic & Hybrid]
C --> E[Analyze: AST & Symbols]
D --> F[Memory: Observations & Sessions]
E --> F
F --> G[Client: CLI / HTTP / MCP]Storage:
.codeindex/index.db(SQLite + Vectors)Core modules:
indexer.py: File system synchronization and AST parsing.storage.py: Single-file SQLite interface for portability.memory_service.py: Orchestrates the persistent memory lifecycle.
π Deep Intelligence (Analyze)
The analyze command is the "scalpel" of CodeIndex.
Command | Purpose | Edge Case / Power Tip |
| List tracked project files | Use |
| Query Python AST nodes | Filter by |
| Extract signatures & docs | Perfect for generating "symbol maps" for agents. |
| Find cross-file references | Essential for refactoring impact analysis. |
| Project summaries | See language distribution and symbol counts. |
π§ Persistent Memory
When you use CodeIndex, it remembers. This keeps the AI "on track" by providing a history of discovered facts.
Observations (
obs_...): Discrete facts extracted during search.Citations (
cit_...): Direct links to source code backing up observations.Layers:
Summary: High-level context (low tokens).Expanded: Detailed snippets.Full: The complete raw observation.
CodeIndex ships with a full Model Context Protocol (MCP) implementation. This allows LLMs (like Claude Desktop or custom agents) to use CodeIndex as a toolset.
Claude Desktop Integration
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"codeindex": {
"command": "python",
"args": [
"-m",
"codeindex.cli",
"serve",
"--port",
"9090"
]
}
}
}MCP Toolset includes:
codeindex_search: Search the codebase semantically.codeindex_analyze: Run deep structural analysis.codeindex_memory_status: Check what the project currently remembers.codeindex_memory_search: Retrieve past findings.
π§ͺ Testing
We value stability. Our test suite covers CLI, HTTP, and internal logic.
pytestCurrent test coverage includes incremental sync, memory persistence, and MCP tool serialization.
Web UI: A unified dashboard for browsing the Index and Memory layers (Completed in v0.0.3).
Git Integration: Automatically respect
.gitignoreand prioritize recently changed files.Context Pruning: AI-driven importance scoring for memory entries.
CodeIndex is released under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Your personal library, readable by AI agents: durable snapshots, hybrid search, 46 MCP tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.30MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform hybrid code search, get explanations, analyze relations and impacts, retrieve context packs, and generate documentation across ~45 languages via 17 MCP tools, all powered by a local vector database and LLM.3Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to maintain a private, local-first persistent memory by automatically saving, searching, and retrieving structured project memories through MCP, with hybrid keyword and embedding search, feedback-driven ranking, and no cloud dependency.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to locally search, query, and understand codebases with token-efficient context, dependency graphs, history, architecture diagrams, and metrics through MCP.15 npm3MIT