Skip to main content
Glama
marksolly

Code Index MCP

by marksolly

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
set_project_pathC

Set the base project path for indexing.

search_code_advancedA
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 literal text or regex (see regex parameter).
    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", "*.js", "test_*.py").
                 All search tools now handle glob patterns consistently:
                 - ugrep: Uses glob patterns (*.py, *.{js,ts})
                 - ripgrep: Uses glob patterns (*.py, *.{js,ts})
                 - ag (Silver Searcher): Automatically converts globs to regex patterns
                 - grep: Basic glob pattern matching
                 All common glob patterns like "*.py", "test_*.js", "src/*.ts" are supported.
    fuzzy: If True, enables fuzzy/partial matching behavior varies by search tool:
           - ugrep: Native fuzzy search with --fuzzy flag (true edit-distance fuzzy search)
           - ripgrep, ag, grep, basic: Word boundary pattern matching (not true fuzzy search)
           IMPORTANT: Only ugrep provides true fuzzy search. Other tools use word boundary
           matching which allows partial matches at word boundaries.
           For exact literal matches, set fuzzy=False (default and recommended).
    regex: Controls regex pattern matching behavior:
           - If True, enables regex pattern matching
           - If False, forces literal string search
           - If None (default), automatically detects regex patterns and enables regex for patterns like "ERROR|WARN"
           The pattern will always be validated for safety to prevent ReDoS attacks.

Returns:
    A dictionary containing the search results or an error message.
find_filesA
Find files matching a glob pattern using efficient directory tree traversal.

Use when:
- Looking for files by pattern (e.g., "*.py", "test_*.js", "src/**/*.ts")
- Searching by filename only (e.g., "README.md" finds all README files)
- Checking if specific files exist in the project
- Getting file lists for further analysis

Pattern matching:
- Supports both full path and filename-only matching
- Uses forward slashes consistently across all platforms
- Efficient directory tree traversal for better performance

Args:
    pattern: Glob pattern to match files (e.g., "*.py", "test_*.js", "README.md")

Returns:
    Dictionary with files list and status information
get_file_summaryA
Get a summary of a specific file, including:
- Line count
- Function/class definitions (for supported languages)
- Import statements
- Basic complexity metrics
refresh_indexA
Manually refresh the project index when files have been added/removed/moved.

Use when:
- File watcher is disabled or unavailable
- After large-scale operations (git checkout, merge, pull) that change many files
- When you want immediate index rebuild without waiting for file watcher debounce
- When find_files results seem incomplete or outdated
- For troubleshooting suspected index synchronization issues

Important notes for LLMs:
- Always available as backup when file watcher is not working
- Performs full project re-indexing for complete accuracy
- Use when you suspect the index is stale after file system changes
- **Call this after programmatic file modifications if file watcher seems unresponsive**
- Complements the automatic file watcher system

Returns:
    Success message with total file count
get_settings_infoB

Get information about the project settings.

create_temp_directoryA

Create the temporary directory used for storing index data.

check_temp_directoryA

Check the temporary directory used for storing index data.

clear_settingsB

Clear all settings and cached data.

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.

get_file_watcher_statusA

Get file watcher service status and statistics.

configure_file_watcherC

Configure file watcher service settings.

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

Latest Blog Posts

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/marksolly/code-scope-mcp'

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