$ show omar-haris/smart-coding-mcp
This repository implements an MCP (Model Context Protocol) server that provides semantic code search capabilities for AI assistants. It enables developers to search their codebases by meaning rather than just keywords, using local AI models to ensure privacy and avoid external API calls. The system features semantic code search using embeddings (nomic-embed-text-v1.5 with MRL), incremental indexing with file watching, efficient SQLite-based caching of embeddings, cross-platform package version checking across 20+ ecosystems, workspace switching capabilities, and resource throttling to prevent system overload during indexing. The codebase demonstrates strong engineering practices with proper error handling, modular design, and attention to user experience.
The LLM identified 3 files worth highlighting for reuse:
Implements MRL (Matryoshka Representation Learning) for flexible embedding dimensions (64-768d) with sophisticated error handling. Features automatic recovery from corrupted model files by clearing cache and retrying, fallback to legacy models if recovery fails, and proper management of model loading with various failure modes. Demonstrates non-obvious skill in handling ML model reliability issues that would be valuable in any AI application.
Provides an efficient SQLite-based cache for embeddings that replaces the previous JSON-based approach. Includes automatic migration from legacy JSON cache to SQLite, uses WAL (Write-Ahead Logging) mode for better concurrency, implements batch operations for improved performance, and provides proper transaction handling for data integrity. Demonstrates advanced database optimization techniques and thoughtful migration strategy.
Implements comprehensive version checking across 20+ package ecosystems (npm, PyPI, Crates.io, Maven, etc.) with caching, retry logic, and proper error handling. Handles various edge cases for different package registries, including authentication requirements and format variations. Shows non-obvious skill in creating a robust, extensible solution for a common developer need that could be extracted as a standalone package version checker.