Server facts
Code Index MCP
Project
- Author
- johnhuang316
- Repository
- github.com/johnhuang316/code-index-mcp
- License
- MIT
- Category
- Developer Tools
Tech
- Runtime / language
- pythonPython
- Transports
- stdio
- Remote available
- No
- Authentication
- Not specified
Activity
- GitHub stars
- 1,003
- Last commit
- Data as of
Tags
- Code Analysis
- Code Search
- Indexing
- Python
- Tree Sitter
Overview
Code Index MCP provides repository discovery, code search, and structural analysis for AI assistants. A shallow index tracks files for quick navigation, while an explicit deep-index build produces symbol information for more detailed summaries. Specialized Tree-sitter strategies cover ten languages, including Rust, Go, Python, TypeScript, JavaScript, Java, C#, Kotlin, Zig, and Objective-C. Other supported file types use a basic indexing strategy instead of the same level of syntax analysis. The README also lists document, configuration, frontend, database, and build-file coverage.
Search selects among available native utilities such as ugrep, ripgrep, ag, and grep. Matching is literal by default, with optional regex, fuzzy matching, file filters, and result pagination. Regex requires a native search utility because the basic fallback only handles literal matching. A file watcher batches changes and refreshes the shallow index, but updated symbol metadata still requires a deep rebuild. Persistent caching and build-directory filtering support repeated work on larger repositories. Setup uses Python 3.10 or newer with uvx, and the project path can be supplied at launch or through a tool after startup. Maintenance tools expose watcher status, configuration, storage checks, cache resets, and search-tool detection. This separation between fast file discovery and deliberate deep analysis is important when using it for reviews, refactoring, debugging, or architectural exploration.
Install & configure
Requirements
- Python 3.10+
- uv / uvx
- A project directory to index
- A native search utility for regex mode
uvx code-index-mcpCall 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.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"code-index-mcp": {
"command": "uvx",
"args": [
"code-index-mcp"
],
"env": {}
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"code-index-mcp": {
"command": "uvx",
"args": [
"code-index-mcp"
],
"env": {}
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"code-index-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"code-index-mcp"
],
"env": {}
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"code-index-mcp": {
"command": "uvx",
"args": [
"code-index-mcp"
],
"env": {}
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"code-index-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"code-index-mcp"
],
"env": {}
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| set_project_path | Choose a repository directory and initialize its index. |
| refresh_index | Rebuild the shallow file index. |
| build_deep_index | Build symbol metadata needed for deep analysis. |
| get_settings_info | Inspect project configuration and indexing status. |
| search_code_advanced | Search code with filters, pagination, and optional fuzzy or regex matching. |
| find_files | Find repository files using glob patterns. |
| get_file_summary | Summarize file structure and symbols using the deep index. |
| get_file_watcher_status | Inspect whether filesystem monitoring is active. |
| configure_file_watcher | Configure automatic refresh and watcher behavior. |
| create_temp_directory | Prepare a storage directory for index data. |
| check_temp_directory | Check index storage location and permissions. |
| clear_settings | Reset cached index data and configuration. |
| refresh_search_tools | Detect available native search utilities again. |
Names, permissions, and defaults can change. Check the current upstream documentation before granting access.
Use cases
- Find code affected by an API migration.
- Locate files by glob before inspecting them.
- Summarize imports, functions, and complexity after deep indexing.
- Explore an unfamiliar repository during a code review.
- Keep file discovery current as the workspace changes.
Strengths
- Combines lightweight file discovery with deeper symbol analysis.
- Specialized Tree-sitter parsing for ten languages.
- Configurable monitoring and persistent index caching.
- Search supports filters and pagination.
Limitations
- Deep summaries require build_deep_index first.
- Languages outside the specialized set get basic fallback indexing.
- Regex search requires an installed native search utility.
Frequently asked questions
Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.