AiDex
MCP Server for persistent code indexing. Gives AI assistants (Claude, Gemini, Copilot, Cursor) instant access to your codebase. 50x less context than grep.
claude mcp add --transport stdio cscsoftware-aidex aidex
How to use
AiDex is an MCP server that indexes your codebase and serves precise, context-preserving code search results to your AI assistant. It uses Tree-sitter to parse code and builds an indexed, queryable database (.aidex/) so that your AI can locate definitions, signatures, and relevant file summaries without sifting through raw text. Available tools include aidex_init to index a project, aidex_query to search by term (with options like contains, starts_with, and exact matches), aidex_signature to get a file's classes and method signatures, aidex_signatures for multiple files, and aidex_summary to get a project overview. These tools help keep token usage low while preserving accuracy, enabling faster and more focused code understanding during chats with Claude, Gemini, Windsurf, VS Code Copilot, and other MCP clients.
To use AiDex, first install and register it with your AI client. Once registered, you can index a project with aidex_init({ path: "/path/to/project" }). After indexing, queries such as aidex_query({ term: "Calculate" }) yield concise results with file names and line numbers, and aids like aidex_signature({ file: "src/Engine.cs" }) provide structured signatures. You can also explore project structure and summaries via aidex_tree or aidex_summary to understand entry points and language distribution. When integrated into your AI workflow, your assistant will prefer these tools over broad grepping, dramatically reducing context token consumption during code navigation.
How to install
Prerequisites:
- Node.js 18+ installed on your machine
- npm (comes with Node.js)
- Internet access to fetch npm packages
Step-by-step installation:
- Install AiDex MCP globally
npm install -g aidex-mcp
- Register AiDex with your AI clients (examples shown):
- Automatic setup (recommended):
aidex setup
This registers AiDex with Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code Copilot, etc. If you need manual setup, proceed with the next step.
- Manual configuration with your MCP client (example for the assistant config):
- For Claude Code or Gemini CLI, point to the aidex executable and name the server in your config as shown in the README examples.
- Verify installation:
aidex --help
This should display available commands like aidex_init, aidex_query, aidex_signature, etc.
- Index a project and start using AiDex:
aidex_init({ path: "/path/to/your/project" })
After indexing, your AI can call aidex_query and related tools via the configured MCP server.
Additional notes
Tips and notes:
- The index is stored in a .aidex/ folder within the project (SQLite backend). Ensure the project path is accessible and has read permission.
- Excluded files (like build outputs) are automatically ignored during indexing.
- Use aidex_update to re-index a single changed file instead of re-indexing the entire project for efficiency.
- If you rename the server in your MCP client configuration, tool prefixes (e.g., aidex_query) will reflect the new name; keep consistency across your clients.
- If you encounter permission errors on indexing, check that you have write access to the project directory and its .aidex/ subfolder.
- For large codebases, initial indexing may take a short time proportional to the number of files; subsequent incremental updates are faster.
Related MCP Servers
claude-context
Code search MCP for Claude Code. Make entire codebase the context for any coding agent.
Overture
Overture is an open-source, locally running web interface delivered as an MCP (Model Context Protocol) server that visually maps out the execution plan of any AI coding agent as an interactive flowchart/graph before the agent begins writing code.
Mantic.sh
A structural code search engine for Al agents.
mcp-local-rag
Local-first RAG server for developers using MCP. Semantic + keyword search for code and technical docs. Fully private, zero setup.
coplay-unity-plugin
Unity plugin for Coplay
codingbuddy
Codingbuddy orchestrates 29 specialized AI agents to deliver code quality comparable to a team of human experts through a PLAN → ACT → EVAL workflow.