Data as of
Code Index MCP for Claude Code: Setup & Config
Claude Code: Code Index MCP helps assistants search and navigate repositories using file indexes and optional deep symbol analysis.
What you can do with Code Index in Claude Code
Use quick file indexing and opt-in deep syntax analysis to help assistants navigate larger repositories.
- Summarize imports, functions, and complexity after deep indexing.
- Explore an unfamiliar repository during a code review.
- Keep file discovery current as the workspace changes.
Before you start: Code Index in Claude Code
- Python 3.10+
- uv / uvx
- A project directory to index
- A native search utility for regex mode
Call set_project_path after launch or use the documented --project-path option. File watching refreshes the shallow index; build_deep_index is required for symbol summaries. Windows clients may need the profile-directory environment overrides described in the README.
Code Index Claude Code configuration
Choose Claude Code configuration scope
For Code Index MCP, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.
Add Code Index MCP to Claude Code
Use the code-index-mcp entry below in mcpServers. Keep Code Index MCP's documented stdio connection fields and your other Claude Code entries.
Check Code Index MCP in Claude Code
Code Index MCP: Inspect claude mcp list and /mcp status.
Config file · Project scope: .mcp.json at the repository root
{
"mcpServers": {
"code-index-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"code-index-mcp"
],
"env": {}
}
}
}claude mcp add-json --scope project 'code-index-mcp' '{"type":"stdio","command":"uvx","args":["code-index-mcp"],"env":{}}'Code Index tools available to Claude Code
Code Index's stored tool list documents 13 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.
- set_project_path
For Code Index's set_project_path, review the permission request and arguments in Claude Code before approval.
- refresh_index
For Code Index's refresh_index, review the permission request and arguments in Claude Code before approval.
- build_deep_index
For Code Index's build_deep_index, review the permission request and arguments in Claude Code before approval.
Build symbol metadata needed for deep analysis.
- get_settings_info
For Code Index's get_settings_info, review the permission request and arguments in Claude Code before approval.
Inspect project configuration and indexing status.
- search_code_advanced
For Code Index's search_code_advanced, review the permission request and arguments in Claude Code before approval.
Search code with filters, pagination, and optional fuzzy or regex matching.
- find_files
For Code Index's find_files, review the permission request and arguments in Claude Code before approval.
Find repository files using glob patterns.
- get_file_summary
For Code Index's get_file_summary, review the permission request and arguments in Claude Code before approval.
- get_file_watcher_status
For Code Index's get_file_watcher_status, review the permission request and arguments in Claude Code before approval.
- configure_file_watcher
For Code Index's configure_file_watcher, review the permission request and arguments in Claude Code before approval.
- create_temp_directory
For Code Index's create_temp_directory, review the permission request and arguments in Claude Code before approval.
- check_temp_directory
For Code Index's check_temp_directory, review the permission request and arguments in Claude Code before approval.
Check index storage location and permissions.
- clear_settings
For Code Index's clear_settings, review the permission request and arguments in Claude Code before approval.
Reset cached index data and configuration.
- refresh_search_tools
For Code Index's refresh_search_tools, review the permission request and arguments in Claude Code before approval.
Detect available native search utilities again.
Troubleshooting Code Index in Claude Code
- If Code Index MCP fails to start, check uvx code-index-mcp (from uv, for Python tools), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
- Code Index MCP uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: Deep summaries require build_deep_index first.
- Known limitation: Languages outside the specialized set get basic fallback indexing.
- Known limitation: Regex search requires an installed native search utility.
- General Claude Code troubleshooting lives in the /clients/claude-code guide.
Code Index MCP — details. Claude Code guide