code-index-mcp

johnhuang316/code-index-mcp

3.7

If you are the rightful owner of code-index-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Code Index MCP is a specialized server for intelligent code indexing and analysis, enabling LLMs to interact with code repositories.

Tools

Functions exposed to the LLM to take actions

set_project_path

Set the base project path for indexing.

search_code_advanced

Search for a code pattern in the project using an advanced, fast tool.

This tool automatically selects the best available command-line search tool (like ugrep, ripgrep, ag, or grep) for maximum performance.

Args: pattern: The search pattern (can be a regex if fuzzy=True). case_sensitive: Whether the search should be case-sensitive. context_lines: Number of lines to show before and after the match. file_pattern: A glob pattern to filter files to search in (e.g., "*.py"). fuzzy: If True, treats the pattern as a regular expression. If False, performs a literal/fixed-string search. For 'ugrep', this enables fuzzy matching features.

Returns: A dictionary containing the search results or an error message.

find_files

Find files in the project matching a specific glob pattern.

get_file_summary

Get a summary of a specific file, including:

  • Line count
  • Function/class definitions (for supported languages)
  • Import statements
  • Basic complexity metrics

refresh_index

Refresh the project index.

get_settings_info

Get information about the project settings.

create_temp_directory

Create the temporary directory used for storing index data.

check_temp_directory

Check the temporary directory used for storing index data.

clear_settings

Clear all settings and cached data.

refresh_search_tools

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.

Prompts

Interactive templates invoked by user choice

analyze_code

Prompt for analyzing code in the project.

code_search

Prompt for searching code in the project.

set_project

Prompt for setting the project path.

Resources

Contextual data attached and managed by the client

get_config

URI: config://code-indexer

MIME: text/plain

Get the current configuration of the Code Indexer.

get_project_structure

URI: structure://project

MIME: text/plain

Get the structure of the project as a JSON tree.

get_settings_stats

URI: settings://stats

MIME: text/plain

Get statistics about the settings directory and files.