Code Index MCP
Supports indexing and analysis of Astro projects, including component structure and syntax-aware search.
Supports indexing and analysis of C/C++ code, including classes, functions, includes, and preprocessor directives.
Supports indexing and analysis of CSS files, including selectors, classes, and styling structure.
Supports indexing and analysis of EJS templates, including embedded JavaScript and includes.
Supports indexing and analysis of Flyway migration files, including SQL and Java-based migrations.
Supports indexing and analysis of JavaScript code, including ES modules, classes, and functions.
Supports indexing and analysis of Kotlin code, including classes, functions, and extensions.
Supports indexing and analysis of Less stylesheets, including variables, mixins, and imports.
Supports indexing and analysis of Liquibase migration files, including change sets and preconditions.
Supports indexing and analysis of Lua code, including tables, functions, and modules.
Supports indexing and analysis of Markdown documentation, including headings, code blocks, and links.
Supports indexing and analysis of MDX files, combining Markdown with JSX components.
Supports indexing and analysis of MySQL SQL files, including queries, stored procedures, and migrations.
Supports indexing and analysis of Perl code, including packages, subroutines, and regex patterns.
Supports indexing and analysis of PHP code, including classes, functions, and namespaces.
Supports indexing and analysis of PostgreSQL SQL files, including queries, functions, and migrations.
Supports indexing and analysis of Pug templates, including mixins, includes, and interpolation.
Supports indexing and analysis of Python code, including imports, classes, functions, and complexity metrics.
Supports indexing and analysis of React projects, including JSX/TSX components, hooks, and imports.
Supports indexing and analysis of Ruby code, including modules, classes, methods, and gems.
Supports indexing and analysis of Rust code, including modules, structs, and functions.
Supports indexing and analysis of Sass/SCSS stylesheets, including variables, mixins, and inheritance.
Supports indexing and analysis of Scala code, including objects, classes, and traits.
Supports indexing and analysis of shell scripts (Bash, Zsh), including functions and command structure.
Supports indexing and analysis of SQLite SQL files, including queries, clauses, and database objects.
Supports indexing and analysis of Stylus stylesheets, including functions and imports.
Supports indexing and analysis of Svelte projects, including component structure and syntax-aware search.
Supports indexing and analysis of Swift code, including structs, classes, functions, and protocols.
Supports indexing and analysis of TypeScript code, including types, interfaces, and generics.
Supports indexing and analysis of XML files, including elements, attributes, and schemas.
Supports indexing and analysis of YAML configuration and data files.
Supports indexing and analysis of Zig code, including structs, enums, and functions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Code Index MCPfind all classes that implement the Observer pattern"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Index MCP
Intelligent code indexing and analysis for Large Language Models
Transform how AI understands your codebase with advanced search, analysis, and navigation capabilities.
Overview
Code Index MCP is a Model Context Protocol server that bridges the gap between AI models and complex codebases. It provides intelligent indexing, advanced search capabilities, and detailed code analysis to help AI assistants understand and navigate your projects effectively.
Perfect for: Code review, refactoring, documentation generation, debugging assistance, and architectural analysis.
Related MCP server: Portable MCP Toolkit
Key Features
π Intelligent Search & Analysis
Advanced Search: Auto-detects and uses the best available tool (ugrep, ripgrep, ag, or grep)
Regex Support: Full regex pattern matching with ReDoS attack prevention
Fuzzy Search: True fuzzy matching with edit distance (ugrep) or word boundary patterns
File Analysis: Deep insights into structure, imports, classes, methods, and complexity metrics
ποΈ Multi-Language Support
Mainstream Languages: Java, Python, JavaScript/TypeScript, C/C++, Go, Rust, C#
Mobile Development: Swift, Kotlin, Objective-C/C++, React Native
Web Frontend: Vue, React, Svelte, Astro, HTML, CSS, SCSS
Database: SQL (MySQL, PostgreSQL, SQLite), NoSQL, stored procedures, migrations
Scripting: Ruby, PHP, Shell, PowerShell, Bash
Systems: C/C++, Rust, Go, Zig
JVM Ecosystem: Java, Kotlin, Scala, Groovy
Others: Lua, Perl, R, MATLAB, configuration files
50+ File Types Total - View complete list
β‘ Real-time Monitoring & Auto-refresh
File Watcher: Automatic index updates when files change
Cross-platform: Native OS file system monitoring (inotify, FSEvents, ReadDirectoryChangesW)
Smart Debouncing: Batches rapid changes to prevent excessive rebuilds (default: 6 seconds)
Thread-safe: Non-blocking background operations with ThreadPoolExecutor
β‘ Performance & Efficiency
Smart Indexing: Recursively scans with intelligent filtering of build directories
Persistent Caching: Stores indexes for lightning-fast subsequent access
Lazy Loading: Tools detected only when needed for optimal startup
Memory Efficient: Intelligent caching strategies for large codebases
Supported File Types
System & Low-Level:
C/C++ (
.c,.cpp,.h,.hpp)Rust (
.rs)Zig (
.zig)Go (
.go)
Object-Oriented:
Java (
.java)C# (
.cs)Kotlin (
.kt)Scala (
.scala)Objective-C/C++ (
.m,.mm)Swift (
.swift)
Scripting & Dynamic:
Python (
.py)JavaScript/TypeScript (
.js,.ts,.jsx,.tsx,.mjs,.cjs)Ruby (
.rb)PHP (
.php)Shell (
.sh,.bash)
Frameworks & Libraries:
Vue (
.vue)Svelte (
.svelte)Astro (
.astro)
Styling:
CSS (
.css,.scss,.less,.sass,.stylus,.styl)HTML (
.html)
Templates:
Handlebars (
.hbs,.handlebars)EJS (
.ejs)Pug (
.pug)
SQL Variants:
Standard SQL (
.sql,.ddl,.dml)Database-specific (
.mysql,.postgresql,.psql,.sqlite,.mssql,.oracle,.ora,.db2)
Database Objects:
Procedures & Functions (
.proc,.procedure,.func,.function)Views & Triggers (
.view,.trigger,.index)
Migration & Tools:
Migration files (
.migration,.seed,.fixture,.schema)Tool-specific (
.liquibase,.flyway)
NoSQL & Modern:
Graph & Query (
.cql,.cypher,.sparql,.gql)
Markdown (
.md,.mdx)Configuration (
.json,.xml,.yml,.yaml)
Quick Start
π Recommended Setup (Most Users)
The easiest way to get started with any MCP-compatible application:
Prerequisites: Python 3.10+ and uv
Add to your MCP configuration (e.g.,
claude_desktop_config.jsonor~/.claude.json):{ "mcpServers": { "code-index": { "command": "uvx", "args": ["code-index-mcp"] } } }Restart your application β
uvxautomatically handles installation and execution
π οΈ Development Setup
For contributing or local development:
Clone and install:
git clone https://github.com/johnhuang316/code-index-mcp.git cd code-index-mcp uv syncConfigure for local development:
{ "mcpServers": { "code-index": { "command": "uv", "args": ["run", "code-index-mcp"] } } }Debug with MCP Inspector:
npx @modelcontextprotocol/inspector uv run code-index-mcp
If you prefer traditional pip management:
pip install code-index-mcpThen configure:
{
"mcpServers": {
"code-index": {
"command": "code-index-mcp",
"args": []
}
}
}Available Tools
ποΈ Project Management
Tool | Description |
| Initialize indexing for a project directory |
| Rebuild the project index after file changes |
| View current project configuration and status |
π Search & Discovery
Tool | Description |
| Smart search with regex, fuzzy matching, and file filtering |
| Locate files using glob patterns (e.g., |
| Analyze file structure, functions, imports, and complexity |
π Monitoring & Auto-refresh
Tool | Description |
| Check file watcher status and configuration |
| Enable/disable auto-refresh and configure settings |
π οΈ System & Maintenance
Tool | Description |
| Set up storage directory for index data |
| Verify index storage location and permissions |
| Reset all cached data and configurations |
| Re-detect available search tools (ugrep, ripgrep, etc.) |
Usage Examples
π― Quick Start Workflow
1. Initialize Your Project
Set the project path to /Users/dev/my-react-appAutomatically indexes your codebase and creates searchable cache
2. Explore Project Structure
Find all TypeScript component files in src/componentsUses: find_files with pattern src/components/**/*.tsx
3. Analyze Key Files
Give me a summary of src/api/userService.tsUses: get_file_summary to show functions, imports, and complexity
π Advanced Search Examples
Search for all function calls matching "get.*Data" using regexFinds: getData(), getUserData(), getFormData(), etc.
Find authentication-related functions with fuzzy search for 'authUser'Matches: authenticateUser, authUserToken, userAuthCheck, etc.
Search for "API_ENDPOINT" only in Python filesUses: search_code_advanced with file_pattern: "*.py"
Configure automatic index updates when files changeUses: configure_file_watcher to enable/disable monitoring and set debounce timing
I added new components, please refresh the project indexUses: refresh_index to update the searchable cache
Troubleshooting
π Auto-refresh Not Working
If automatic index updates aren't working when files change, try:
pip install watchdog(may resolve environment isolation issues)Use manual refresh: Call the
refresh_indextool after making file changesCheck file watcher status: Use
get_file_watcher_statusto verify monitoring is active
Development & Contributing
π§ Building from Source
git clone https://github.com/johnhuang316/code-index-mcp.git
cd code-index-mcp
uv sync
uv run code-index-mcpπ Debugging
npx @modelcontextprotocol/inspector uvx code-index-mcpπ€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
π Translations
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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