๐ ๐ ๐ ๐ช ๐ง - Persistent Tree-sitter code index for precise, compact code search in languages including C#,โฆ
AiDex
ไปฅไธๆๅฝ่ช่ฏฅไปๅบ็ README๏ผ็ๆฎต๏ผ ยท ๅจ GitHub ่ฏปๅฎๆด README โ
**The persistent brain for AI coding agents.**
AiDex is an MCP server that gives AI coding assistants a memory, semantic search, and live telemetry โ local-first, model-agnostic. Works with any MCP-compatible AI assistant: Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code Copilot, and more.
Three Pillars
๐ง **Memory** โ Tasks, notes, and session-notes survive every chat. Auto-logged history, scheduled tasks, cross-session continuity. Your AI knows tomorrow what mattered today.
๐ **Search** โ Three modes: exact (identifier), semantic (concept), hybrid (RRF fusion of both). Embeds code, docs, and workspace items into one ranking. Cross-project โ every repo in one query. Optional LLM layer translates non-English queries and reranks results.
๐ **Telemetry** โ LogHub receives live logs from any app via HTTP (no SDK). The AI watches what your code actually does, not just what it says. Live-streamed in the Viewer.
And yes โ it's still 50ร more token-efficient than grep.
| | Without AiDex | With AiDex |
|---|---|---|
| Find PlayerHealth | Grep โ 200 hits in 40 files โ reads 5 files โ **2,000+ tokens** | 1 query โ 3 exact locations โ **~50 tokens** |
| Get file structure | Reads entire 500-line file โ **1,500 tokens** | Signatures โ classes + methods โ **~80 tokens** |
| What changed today? | git diff + grep + context โ **3,000+ tokens** | Time-filtered query โ **~50 tokens** |
What's Inside โ 33 Tools in One Server
| Category | Tools | What it does |
|----------|-------|--------------|
| **Semantic Search** ๐ | search, settings | Hybrid / semantic / exact retrieval over code, docs & workspace. Settings tab to configure embeddings + LLM layer |
| **Index & Identifier Search** | init, query, update, remove, status | Index your project, search identifiers by name (exact/contains/starts_with), time-based filtering |
| **Signatures** | signature, signatures | Get classes + methods of any file without reading it โ single file or glob pattern |
| **Project Overview** | summary, tree, describe, files | Entry points, language breakdown, file tree with stats, file listing by type |
| **Cross-Project** | link, unlink, links, scan | Link dependencies, discover indexed projects |
| **Global Search** | global_init, global_query, global_signatures, global_status, global_refresh | Search identifiers across ALL your projects โ "Have I ever written X?" |
| **Guidelines** | global_guideline | Persistent AI instructions & coding conventions โ shared across all projects |
| **Sessions** | session, note | Track sessions, detect external changes, leave notes for next session (with searchable history) |
| **Task Backlog** | task, tasks | Built-in task management with priorities, tags, auto-logged history, and **scheduled/recurring tasks** |
| **Log Hub** | log | Universal log receiver โ any program sends logs via HTTP, queryable by the AI, live in Viewer |
| **Screenshots** | screenshot, windows | Cross-platform screen capture with LLM optimization โ scale + color reduction saves up to 95% tokens |
| **Viewer** | viewer | Interactive browser UI with file tree, signatures, tasks, logs, search, and live reload |
**14 languages** โ C#, TypeScript, JavaScript, Rust, Python, C, C++, Java, Go, PHP, Ruby, HCL/Terraform, Kotlin, Swift โ plus Astro frontmatter
Quick Examples โ see it in action
Table of Contents
- What's Inside
- Semantic Search & LLM Layer ๐
- The Problem
- The Solution
- Why Not Just Grep?
- How It Works
- Features
- Supported Languages
- Quick Start
- Available Tools
- Time-based Filtering
- Project Structure
- Session Notes
- Task Backlog
- Global Search
- AI Guidelines
- Log Hub
- Debug Dashboard
- Screenshots โ LLM-Optimized
- Interactive Viewer
- CLI Usage
- Performance
- Technology
- Contributing
- License
Semantic Search & LLM Layer
**v2.0** added semantic search via locally-run embeddings โ your AI can find a function even when it doesn't know the exact identifier.
Three modes โ pick the right tool for the question
| Mode | What it does | When to use |
|------|--------------|-------------|
| exact | Identifier match (same as aidex_query) | You know the name. PlayerHealth โ 3 hits |
| semantic | Vector KNN over embedded code+docs+workspace | You know the *concept*. "how do we cache the model" โ finds getQueryEmbedder |
| hybrid (default) | RRF fusion of both | Mixed queries. Robust by default |
What gets embedded
- **Code** โ every method and type, three-tier chunking (signature + doc-comment + weighted identifier bag)