Releases: johnhuang316/code-index-mcp
Release Notes v0.4.1
Major Features
Regex Support in Search
Fixes #11: OR search (regex pipe operator) not working in search_code_advanced
Added comprehensive regex support to the search_code_advanced
tool with the new regex
parameter:
# OR searches now work!
search_code_advanced("ERROR|WARN", regex=True) # Returns OR matches
# Other regex patterns
search_code_advanced("function|class", regex=True) # OR search
search_code_advanced("^import", regex=True) # Start of line
search_code_advanced("Error$", regex=True) # End of line
search_code_advanced("[A-Z]+", regex=True) # Character classes
Key Benefits:
- OR searches: Use
|
to search for multiple patterns simultaneously - Pattern matching: Full regex support with anchors, character classes, etc.
- Safety: Built-in ReDoS attack protection
- Backward compatible: Default behavior unchanged (literal search)
Bug Fixes
Fixed ag (Silver Searcher) File Pattern Handling
Resolved issue where glob patterns like *.py
were incorrectly passed to ag's -G
parameter, causing incorrect file matching behavior.
Improvements:
*.py
now correctly converts to\.py$
for ag's regex enginetest_*.js
now correctly converts to^test_.*\.js$
src/*.css
now correctly converts to^src/.*\.css$
- All search tools (ugrep, ripgrep, ag, grep) now handle file patterns consistently
Technical Changes
New Features
regex
parameter: Explicit control over regex vs literal search modes- Pattern safety validation:
is_safe_regex_pattern()
function with ReDoS protection - Automatic glob-to-regex conversion: Smart pattern conversion for ag search strategy
- Enhanced file pattern support: Consistent behavior across all search backends
Security Enhancements
- Protection against ReDoS (Regular Expression Denial of Service) attacks
- Validates regex patterns before execution
- Rejects potentially dangerous patterns like
(.+)+
,(.*)*
- Only allows safe regex metacharacters:
|
,(
,)
,[
,]
,^
,$
Code Improvements
- Renamed
create_safe_fuzzy_pattern()
tocreate_word_boundary_pattern()
for clarity - Improved parameter documentation across all search strategies
- Enhanced error handling and validation
Usage Examples
Basic Regex Search
# Default behavior (literal search) - unchanged
search_code_advanced("ERROR|WARN") # Searches for literal "ERROR|WARN"
# New regex support
search_code_advanced("ERROR|WARN", regex=True) # OR search
File Pattern Examples
# All these now work consistently across all search tools
search_code_advanced("def main", file_pattern="*.py") # Python files
search_code_advanced("function", file_pattern="test_*.js") # Test JS files
search_code_advanced("import", file_pattern="src/*.ts") # TypeScript in src/
Advanced Regex Patterns
search_code_advanced("class [A-Z][a-zA-Z0-9]*", regex=True) # Class names
search_code_advanced("(TODO|FIXME|HACK)", regex=True) # Code comments
search_code_advanced("^\\s*def\\s+", regex=True) # Function definitions
Security Notes
- All regex patterns are validated for safety before execution
- Dangerous patterns that could cause ReDoS attacks are automatically rejected
- Pattern validation ensures server stability and performance
- Safe regex features are clearly documented
Backward Compatibility
This release maintains 100% backward compatibility:
- Default search behavior remains unchanged (literal string search)
- Existing code will continue to work without any modifications
- New
regex
parameter is optional withFalse
as default - File pattern handling improved transparently without API changes
Migration Guide
To use regex features:
# Old way (still works)
search_code_advanced("simple text")
# New regex capabilities
search_code_advanced("pattern1|pattern2", regex=True) # OR search
search_code_advanced("^start", regex=True) # Line start
search_code_advanced("end$", regex=True) # Line end
No migration needed for file patterns:
File pattern handling is automatically improved - existing code works better without changes.
Testing
This release has been thoroughly tested with:
- Basic search functionality validation
- OR pattern matching verification across all search backends
- File pattern conversion for ag, ripgrep, ugrep, and grep
- Safety checks for dangerous regex patterns
- Backward compatibility confirmation with existing codebases
- Performance testing with various pattern complexities
Related Issues
Version Updates
- Bumped version to 0.4.1 reflecting the major regex feature addition
- Updated version strings in
pyproject.toml
andsrc/code_index_mcp/__init__.py
Full Changelog: v0.3.1...v0.4.1
Release Notes: v0.3.1
This release focuses on improving the robustness and consistency of file pattern handling across various search strategies, as well as enhancing the internal file indexing structure for better stability.
Key Changes
Improved File Pattern Handling (Fixes #10)
- Addressed inconsistencies in how
file_pattern
parameters are handled across different search strategies (ugrep
,ripgrep
,ag
,grep
,basic
). - Ensures that file patterns like
"src/*.py"
work consistently, providing more reliable search results. - Enhanced
search_code_advanced
tool docstring with detailed documentation on how each search tool handles file patterns and fuzzy matching.
Refactored File Index Structure
- Improved the internal
file_index
data structure to preventKeyError
crashes in thefind_files
tool. - Ensures consistent representation of file and directory entries, making the indexing logic more maintainable.
Documentation Updates
- Refined
README.md
files (English and Chinese) for clarity and accuracy. - Clarified tooling, improved setup instructions, and restructured usage examples for a better user experience.
Full Changelog: v0.3.0...v0.3.1
Release v0.3.0 - ugrep Support & Search Logic Improvements
What's New
New Search Engine Support
- Added ugrep support - Ultra-fast Unicode grep with native fuzzy search capabilities
- Automatic tool selection - Server now intelligently chooses the best available search tool
Improvements
- Refactored search tool selection logic - Cleaner, more reliable tool detection and fallback
- Enhanced fuzzy search - Better fuzzy matching behavior across different search engines
- Bug fixes - Various small fixes for improved stability and performance
Supported Search Tools
- ugrep (new)
- ripgrep
- ag (The Silver Searcher)
- grep
- Built-in Python search (fallback)
Full Changelog: v0.2.1...v0.3.0
What's Changed
Full Changelog: v0.2.1...v0.3.0
Release v0.2.1 - Zig Language Support
New Features
- Zig Language Support: Added support for
.zig
files in code indexing and searching- Files with
.zig
extension are now automatically indexed - Code search and analysis work seamlessly with Zig source files
- Thanks to @jedisct1 for the contribution!
- Files with
Technical Details
- Updated supported file extensions to include
.zig
- Enhanced documentation to reflect Zig language support
- All existing MCP tools (search_code, find_files, get_file_summary) now work with Zig files
Documentation
- Updated README.md with Zig language in supported languages list
- Updated Chinese documentation (README_zh.md)
v0.2.0: Major Refactoring and Advanced Search
Release v0.2.0: Major Refactoring and Advanced Search
🚀 Major Features
- Advanced Search: Added search_code_advanced tool with automatic detection of ripgrep > ag > grep
- Safe Fuzzy Search: Implemented word-boundary fuzzy matching without regex complexity
- Lazy Loading: Search tools are detected only when needed for better performance
🔧 Refactoring & Cleanup
- Code Deduplication: Eliminated ~70 lines of duplicate code between project_settings.py and server.py
- Centralized Constants: Created constants.py for shared configuration values
- Removed Invasive Features:
- Automatic gitignore modification (was unnecessary)
- README creation functionality (limited value)
🏗️ Architecture Improvements
- Lazy Loading: Search tool detection only occurs when advanced search is used
- Better Error Handling: Improved exception handling across the codebase
- Cleaner Separation: Better separation of concerns between settings and server logic
🛠️ Technical Details
- Search tool priority: ripgrep > ag > grep > basic search
- Safe pattern escaping prevents regex injection
- Backward compatibility maintained for existing functionality
- Settings stored alongside index files for better organization
📁 Files Changed
src/code_index_mcp/constants.py
(new)src/code_index_mcp/project_settings.py
(major refactoring)src/code_index_mcp/server.py
(enhanced with advanced search)
This release significantly improves code organization, adds powerful search capabilities, and removes unnecessary complexity while maintaining full backward compatibility.
v0.1.5
v0.1.5 - Complete Frontend & Database Support
🚀 Major Features
🎨 Complete Frontend Framework Support
- Modern Frameworks: Vue.js (
.vue
), Svelte (.svelte
), Astro (.astro
) - ES Modules:
.mjs
,.cjs
for modern JavaScript projects - Advanced Styling:
.less
,.sass
,.stylus
,.styl
preprocessors - Template Engines:
.hbs
,.handlebars
,.ejs
,.pug
- Documentation:
.mdx
(Markdown + JSX)
🗄️ Comprehensive Database Support
- Core SQL:
.sql
,.ddl
,.dml
files - Database-Specific: MySQL, PostgreSQL, SQLite, SQL Server, Oracle, DB2
- Database Objects: Procedures, functions, views, triggers, indexes
- Migration Tools: Rails, Django, Liquibase, Flyway
- NoSQL & Modern: Cassandra (
.cql
), Neo4j (.cypher
), GraphQL (.gql
), SPARQL
📊 What's New
Frontend Extensions (15 new)
.vue, .svelte, .astro, .mjs, .cjs, .less, .sass, .stylus, .styl,
.hbs, .handlebars, .ejs, .pug, .mdx
Database Extensions (20 new)
.sql, .ddl, .dml, .mysql, .postgresql, .psql, .sqlite, .mssql,
.oracle, .ora, .db2, .proc, .procedure, .func, .function, .view,
.trigger, .index, .migration, .seed, .fixture, .schema, .cql,
.cypher, .sparql, .gql, .liquibase, .flyway
🎯 Use Cases
Frontend Developers:
- Index Vue.js, Svelte, and Astro projects
- Search through CSS preprocessor files
- Navigate template engine files
- Find ES module imports and exports
Full-Stack Developers:
- Search database schemas and migrations
- Find SQL queries and stored procedures
- Navigate ORM framework files
- Index GraphQL schemas and resolvers
DevOps/Database Teams:
- Search migration files across frameworks
- Find database object definitions
- Navigate Liquibase/Flyway scripts
- Index NoSQL query files
📈 Statistics
- 35+ new file extensions added
- Full-stack coverage from frontend to database
- Zero breaking changes - fully backward compatible
- Enhanced documentation with categorized file types
🔧 Technical Improvements
- Organized extension categories with clear comments
- Enhanced README with detailed file type coverage
- Maintained high performance with smart indexing
- Improved code organization and maintainability
🚀 Getting Started
Installation
# Using uvx (recommended)
uvx code-index-mcp
# Using pip
pip install code-index-mcp
Example Usage
# Find all Vue components
find_files "*.vue"
# Search for database queries
search_code "SELECT * FROM"
# Find migration files
find_files "*.migration"
This release transforms Code Index MCP into a truly full-stack development tool supporting the complete modern web development ecosystem!
🙏 Community
Special thanks to [@jordandakota](https://github.com/jordandakota) for suggesting SQL file support, which led to this comprehensive database feature implementation.
Full Changelog: v0.1.2...v0.1.5
v0.1.4
🚀 Features
-
Frontend Framework Support: Added support for modern frontend framework file extensions
- Vue.js single-file components (
.vue
) - Svelte components (
.svelte
) - Astro components (
.astro
) - ES modules (
.mjs
,.cjs
)
- Vue.js single-file components (
-
Enhanced Styling Support: Extended CSS preprocessing capabilities
- Less (
.less
) - Sass (
.sass
,.stylus
,.styl
)
- Less (
-
Template Engine Support: Added popular template engines
- Handlebars (
.hbs
,.handlebars
) - EJS (
.ejs
) - Pug (
.pug
)
- Handlebars (
-
Modern Documentation: Added MDX support (
.mdx
)
📝 Changes
- Organized supported extensions with comments for better maintainability
- Updated documentation to reflect new supported file types
- Total of 15 new file extensions added
🔧 Technical Details
This release expands the code indexing capabilities to cover the full modern web development ecosystem, making the tool more valuable for frontend developers using contemporary frameworks and tooling.
Full Changelog: v0.1.1...v0.1.2
v0.1.3
Code Index MCP v0.1.3
Overview
This release improves documentation, adds GitHub Actions for automated PyPI publishing, and introduces the 'uvx' entry point for simplified MCP configuration.
New Features
- Added GitHub Actions workflow for automated publishing to PyPI
- Implemented 'uvx' entry point for easier integration with MCP clients
- Enhanced README documentation in both English and Chinese
Bug Fixes
- Resolved issues with package metadata and configuration
Improvements
- Updated installation and usage instructions for clarity
- Improved project structure and organization
- Enhanced multilingual support with comprehensive Chinese documentation
- Converted Chinese comments to English in Dockerfile for better maintainability
Usage
This MCP server can be easily integrated with Claude Desktop or other MCP clients by following the setup instructions in the README. The new version simplifies configuration through improved documentation and tooling.
Technical Notes
This release builds upon v0.1.2 and maintains compatibility with MCP >=0.3.0