code-index-mcp  by johnhuang316

Intelligent code indexing and analysis for LLMs

Created 7 months ago
485 stars

Top 63.4% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Model Context Protocol (MCP) server designed to help Large Language Models (LLMs) index, search, and analyze code repositories efficiently. It targets developers and AI engineers seeking to integrate LLMs with their codebases for tasks like code review, refactoring, and documentation generation, offering advanced search and analysis capabilities with minimal setup.

How It Works

The server leverages a file watcher for real-time monitoring and auto-refreshing of code indexes. It intelligently selects and utilizes optimized search tools like ugrep, ripgrep, ag, or grep based on availability, supporting regex and fuzzy matching. The system performs deep file analysis to extract structural information, complexity metrics, and language-specific details, storing this data in a persistent cache for fast retrieval.

Quick Start & Requirements

  • Recommended Setup: Add to MCP configuration (e.g., claude_desktop_config.json or ~/.claude.json) with "command": "uvx", "args": ["code-index-mcp"]. Restart the MCP-compatible application.
  • Prerequisites: Python 3.10+, uv package manager.
  • Development Setup: Clone the repository, run uv sync, and configure MCP to use uv run code-index-mcp.
  • Links: MCP Server

Highlighted Details

  • Supports over 50 file types across numerous programming languages, web frameworks, databases, and configuration files.
  • Features intelligent search with regex (ReDoS prevention) and fuzzy matching.
  • Real-time monitoring with cross-platform file system monitoring and smart debouncing.
  • Persistent caching and lazy loading for performance and memory efficiency.

Maintenance & Community

The project is maintained by johnhuang316. Contributions are welcome via pull requests.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The "auto-refresh not working" troubleshooting section suggests potential environment isolation issues with the watchdog library, recommending manual refresh or checking file watcher status as workarounds.

Health Check
Last Commit

18 hours ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
8
Star History
76 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.