Skip to main content
Glama

code-index-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription
analyze_codePrompt for analyzing code in the project.
code_searchPrompt for searching code in the project.
set_projectPrompt for setting the project path.

Resources

Contextual data attached and managed by the client

NameDescription
config://code-indexer
structure://project
settings://stats

Tools

Functions exposed to the LLM to take actions

NameDescription
set_project_path

Set the base project path for indexing.

search_code
Search for code matches within the indexed files. Returns a dictionary mapping filenames to lists of (line_number, line_content) tuples.
search_code_advanced
Advanced search using external tools (ripgrep, ag, grep) for better performance. Falls back to basic search if no advanced tools are available. Args: pattern: Search pattern case_sensitive: Case sensitive search context_lines: Number of context lines to show around matches file_pattern: File pattern to include (e.g., "*.py", "*.js") fuzzy: Enable safe fuzzy search patterns: - Adds word boundary matching for better results - Allows partial word matching at word boundaries - Safe alternative to full regex support Returns: Dict containing search results and metadata
find_files
Find files in the project that match the given pattern. Supports glob patterns like *.py or **/*.js.
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

Refresh search tools detection and show available capabilities.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/johnhuang316/code-index-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server