codeindex
In-memory MCP server for source code indexing. Replaces grep/find with fast Bleve-powered full-text search, glob file lookup, and auto-updating file watcher. Built for Claude Code and any MCP-compatible client. Single static Go binary, zero external dependencies at runtime.
claude mcp add --transport stdio lexandro-codeindex-mcp /path/to/codeindex-mcp --root /path/to/project
How to use
codeindex-mcp is an in-memory code index MCP server designed to accelerate searches across large codebases. It runs as a standalone server that communicates via the MCP protocol over standard I/O when used directly, and can be registered with Claude Code to provide a fast, indexed surface for full-text search and file access across your project. The server exposes tools for searching content, listing indexed files, reading file contents from memory, checking index status, and triggering reindexing. By registering through Claude Code, you enable automatic discovery of these tools as codeindex_search, codeindex_files, codeindex_read, codeindex_status, and codeindex_reindex, enabling your editor or IDE to query the index efficiently.
How to install
Prerequisites:
- Go 1.22+ installed on your system
- Git (for cloning the repository)
Build from source:
git clone https://github.com/lexandro/codeindex-mcp.git
cd codeindex-mcp
go build -o codeindex-mcp .
This produces a single static Go binary named codeindex-mcp (or codeindex-mcp.exe on Windows).
Register in Claude Code (example):
# Project-specific (writes .mcp.json in the target directory)
./codeindex-mcp register project /path/to/your/project
# Global (writes ~/.claude.json — available in all projects)
./codeindex-mcp register user
# Forward extra server flags (e.g. adjust index size or excludes)
./codeindex-mcp register project . -- --max-file-size 5242880 --exclude "vendor/"
Standalone usage for testing:
# Run the server for a specific project root (reads index from memory after building)
./codeindex-mcp --root /path/to/project
Additional notes
Tips and notes:
- The server uses an in-memory index with a background watcher to stay in sync with the filesystem. Ensure your file tree is accessible and that exclude patterns (via CLI flags or Claude Code config) are appropriate for your workflow.
- When registering with Claude Code, you can pass extra flags to fine-tune indexing behavior (e.g., --max-file-size, --exclude paths). These flags are forwarded to the server at startup.
- If you run into issues with path detection on Windows, the registration tool will wrap commands appropriately; ensure your path syntax is correct for the host OS.
- The MCP Tools exposed by the server include: codeindex_search for full-text content queries, codeindex_files for glob-based file listing, codeindex_read for zero-I/O file reads from the index, codeindex_status for index health, and codeindex_reindex to refresh the index.
- No runtime dependencies beyond the compiled Go binary; distribute the single binary for simplicity.
Related MCP Servers
grepai
Semantic Search & Call Graphs for AI Agents (100% Local)
mcp-ragex
MCP server for intelligent code search: semantic (RAG), symbolic (tree-sitter), and regex (ripgrep) search modes. Built for Claude Code and AI coding assistants.
timebound-iam
An MCP Server that sits between your agent and AWS STS and issues temporary credentials scoped to specific AWS Services
backlog
Help coding agents and developers to keep track of a project's backlog by storing tasks as markdown in git.
interop
Interop CLI: Go command-line tool for efficient project management and command execution across your development workspace.
agent-configs
Control Claude Code, Cursor & Gemini CLI remotely — answer agent questions from your phone via Slack