johnhuang316/code-index-mcp

A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup

What it solves

Code Index MCP solves the difficulty AI assistants have in understanding and navigating complex, multi-language codebases. It provides a structured way for LLMs to index, search, and analyze code symbols and file structures without needing to read every file manually.

How it works

It operates as a Model Context Protocol (MCP) server that bridges an AI model to a local filesystem. It uses a dual-strategy architecture for indexing:

  • Tree-sitter AST Parsing: Provides deep, native syntax parsing for 10 core languages (including Python, TS, Rust, and Go) to extract classes, methods, and call relationships.
  • Fallback Strategy: Provides basic indexing for over 50 other file types.

The server includes a file watcher for real-time index updates and integrates with native search tools like ripgrep or ugrep for advanced regex and fuzzy searching.

Who it’s for

This tool is designed for developers using MCP-compatible AI assistants (like Claude Desktop) who need help with code review, refactoring, debugging, and architectural analysis of large projects.

Highlights

  • Multi-Language Support: Specialized AST parsing for 10 languages and basic support for 50+ file types.
  • Real-time Monitoring: Automatic index updates via a native OS file watcher.
  • Deep Analysis: Ability to generate symbol-level metadata and complexity metrics via a deep index.
  • Flexible Search: Supports literal, regex, and fuzzy matching with paginated results.
  • Persistent Caching: Stores indexes locally for fast subsequent access.

Related

  • Project
  • Project
  • Project
  • Project
  • Project