code-index-mcp
Índice de código MCP
Un servidor de protocolo de contexto de modelo para indexar, buscar y analizar código.
¿Qué es Code Index MCP?
Code Index MCP es un servidor MCP especializado que ofrece funciones inteligentes de indexación y análisis de código. Permite que los modelos de lenguaje de gran tamaño interactúen con sus repositorios de código, ofreciendo información en tiempo real y navegación a través de bases de código complejas.
Este servidor se integra con el Protocolo de Contexto de Modelo (MCP), una forma estandarizada para que los modelos de IA interactúen con herramientas externas y fuentes de datos.
Related MCP server: @lex-tools/codebase-context-dumper
Características principales
Indexación de proyectos : escanea directorios de forma recursiva para crear un índice de archivos de código que se pueda buscar
Búsqueda de código : encuentre patrones, definiciones de funciones y referencias en toda su base de código
Análisis de archivos : obtenga información detallada sobre la estructura, las importaciones y la complejidad de los archivos
Filtrado inteligente : ignora automáticamente los directorios de compilación, las dependencias y los archivos que no son de código
Almacenamiento persistente : almacena en caché los índices para un mejor rendimiento en todas las sesiones
Tipos de archivos admitidos
El servidor admite varios lenguajes de programación y extensiones de archivos, incluidos:
Python (.py)
JavaScript/TypeScript (.js, .ts, .jsx, .tsx)
Java (.java)
C/C++ (.c, .cpp, .h, .hpp)
C# (.cs)
Ir (.go)
Rubí (.rb)
PHP (.php)
Swift (.swift)
Kotlin (.kt)
Óxido (.rs)
Scala (.scala)
Scripts de shell (.sh, .bash)
Archivos web (.html, .css, .scss)
Documentación/Configuración (.md, .json, .xml, .yml, .yaml)
Instalación
Prerrequisitos
Python 3.8 o superior
Gestor de paquetes uv (recomendado)
Uso de uvx (recomendado)
La forma más fácil de instalar y usar code-index-mcp es con uvx:
uvx code-index-mcpUsando pip
Alternativamente, puede instalarlo mediante pip:
pip install code-index-mcpDespués de la instalación, puedes ejecutarlo como un módulo:
python -m code_index_mcpIntegración con Claude Desktop
Agregue esto a su configuración de Claude ( ~/Library/Application Support/Claude/claude_desktop_config.json ):
{
"mcpServers": {
"code-index": {
"command": "uvx",
"args": [
"code-index-mcp"
]
}
}
}Después de agregar la configuración, reinicie Claude Desktop y las herramientas MCP de Code Index estarán disponibles.
Herramientas disponibles
Herramientas principales
set_project_path : establece la ruta del proyecto base para la indexación.
search_code : busca coincidencias de código dentro de los archivos indexados.
find_files : busca archivos en el proyecto que coincidan con un patrón determinado.
get_file_summary : obtiene un resumen de un archivo específico, incluido el recuento de líneas, funciones, importaciones, etc.
refresh_index : Actualiza el índice del proyecto.
get_settings_info : obtiene información sobre la configuración del proyecto.
Herramientas de utilidad
create_temp_directory : crea el directorio temporal utilizado para almacenar datos de índice.
check_temp_directory : verifica el directorio temporal utilizado para almacenar datos de índice.
clear_settings : borra todas las configuraciones y los datos almacenados en caché.
Ejemplo de uso con Claude
A continuación se muestran algunos ejemplos de cómo utilizar Code Index MCP con Claude:
Establecer una ruta de proyecto
Please set the project path to C:\Users\username\projects\my-python-projectBuscando patrones de código
Search the code for all occurrences of "def process_data" in Python filesObtener un resumen de archivo
Give me a summary of the main.py file in the projectEncontrar todos los archivos de un determinado tipo
Find all JavaScript files in the projectDesarrollo
Construyendo desde la fuente
Clonar el repositorio:
git clone https://github.com/username/code-index-mcp.git
cd code-index-mcpInstalar dependencias:
uv syncEjecute el servidor localmente:
uv run code_index_mcpDepuración
Puede utilizar el inspector MCP para depurar el servidor:
npx @modelcontextprotocol/inspector uvx code-index-mcpLicencia
Contribuyendo
¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios.
Idiomas
Available Tools
14 toolsbuild_deep_indexA
Build the deep index (full symbol extraction) for the current project.
This performs a complete re-index and loads it into memory.
Uses parallel processing by default. For large codebases (3000+ files),
tuning max_workers can significantly improve build times.
Args:
max_workers: Maximum number of parallel workers for file processing.
Defaults to min(4, cpu_count) when not specified.
Increase for I/O-bound workloads on machines with many cores.
timeout: Parallel build timeout in seconds. When not specified,
scales dynamically based on file count (0.5s per file,
min 30s, max 600s).
Inputs: max_workers, timeout. Returns: result
check_temp_directoryA
Check the temporary directory used for storing index data.
Inputs: no named parameters. Returns: object
clear_settingsB
Clear all settings and cached data.
Inputs: no named parameters. Returns: result
configure_file_watcherA
Configure file watcher service settings.
Args:
enabled: Whether to enable file watcher
debounce_seconds: Debounce time in seconds before triggering rebuild
additional_exclude_patterns: Additional directory/file patterns to exclude
observer_type: Observer backend to use. Options:
- "auto" (default): platform default observer
- "kqueue": Force kqueue observer (macOS/BSD)
- "fsevents": Force FSEvents observer (macOS only, has known reliability issues)
- "polling": Cross-platform polling fallback (slower but most compatible)
Inputs: enabled, debounce_seconds, additional_exclude_patterns, observer_type. Returns: result
create_temp_directoryA
Create the temporary directory used for storing index data.
Inputs: no named parameters. Returns: object
find_filesA
Find files matching glob pattern using in-memory index. Supports path patterns (.py, test_.js) and filename-only matching (README.md).
Inputs: pattern (required). Returns: result
get_file_summaryB
Get a summary of a specific file, including:
- Line count
- Function/class definitions (for supported languages)
- Import statements
- Basic complexity metrics
Inputs: file_path (required). Returns: object
get_file_watcher_statusA
Get file watcher service status and statistics.
Inputs: no named parameters. Returns: object
get_settings_infoB
Get information about the project settings.
Inputs: no named parameters. Returns: object
get_symbol_bodyA
Get the source code body of a specific symbol (function, method, or class).
This tool retrieves only the code for the specified symbol, enabling efficient
context usage by avoiding loading entire files.
Args:
file_path: Path to the file containing the symbol
symbol_name: Name of the symbol to retrieve (e.g., "process_data", "MyClass.my_method")
Returns:
Dictionary containing:
- status: "success" or "error"
- symbol_name: Name of the symbol
- type: Type of symbol (function, method, class)
- line: Start line number
- end_line: End line number
- code: The actual source code
- signature: Function/method signature (if available)
- docstring: Documentation string (if available)
- called_by: List of symbols that call this symbol
Inputs: file_path (required), symbol_name (required). Returns: object
refresh_indexA
Manually rebuild the project file index. Use after git operations or when index seems stale.
Inputs: no named parameters. Returns: result
refresh_search_toolsA
Manually re-detect the available command-line search tools on the system. This is useful if you have installed a new tool (like ripgrep) after starting the server.
Inputs: no named parameters. Returns: result
search_code_advancedA
Search for code pattern with pagination. Auto-selects best search tool (ugrep/ripgrep/ag/grep). Supports glob file_pattern (e.g., "*.py"), explicit regex mode, and fuzzy matching (ugrep only). Regex matching requires passing regex=True and may require an external search tool.
Inputs: pattern (required), case_sensitive, context_lines, file_pattern, +4 more. Returns: object
set_project_pathC
Set the base project path for indexing.
Inputs: path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct action: index building, file watching, settings management, searching, etc. Overlap is minimal and descriptions clarify the differences.
All tool names use a consistent verb_noun snake_case pattern (e.g., build_deep_index, check_temp_directory, get_file_summary). No mixing of conventions.
14 tools cover indexing, searching, file details, symbol retrieval, settings, and utilities. This is well-scoped for a code index server, neither sparse nor excessive.
Covers core operations: index build/refresh, file and code search, symbol body retrieval, settings, file watcher. Minor gaps like listing symbols or index statistics exist but do not hinder primary use.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server that gives your AI access to the source code and docs of all public github repos
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.640MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server designed to easily dump your codebase context into Large Language Models (LLMs).18 npm3Apache 2.0

CodeAlive MCPofficial
AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.91MIT- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI applications to access and analyze local code repositories without manual uploads, providing file listing, content reading, code searching, and project structure analysis capabilities.7MIT