
omar-haris/smart-coding-mcp 是从 https://github.com/omar-haris/smart-coding-mcp. 导入的 MCP 服务器候选。
概览
omar-haris/smart-coding-mcp 是从 https://github.com/omar-haris/smart-coding-mcp. 导入的 MCP 服务器候选。
概述(AI 翻译)
一个可扩展的模型上下文协议(MCP)服务器,为AI助手提供智能语义代码搜索。采用套娃表示学习(MRL)构建的本地AI模型,支持灵活嵌入维度(64-768d)。
这会带来什么
AI编码助手在能快速找到相关代码时表现更好。传统关键词搜索不够——如果你问“我们在哪里处理认证?”但代码用的是“登录”和“会话”,关键词搜索就会漏掉。
这个MCP服务器通过用AI嵌入索引你的代码库来解决这个问题。你的AI助手可以通过含义而非精确关键词搜索,即使术语不同也能找到相关代码。
可用工具
🔍 a_semantic_search - 通过意义寻找代码
主要的代码库探索工具。利用AI嵌入来理解你的需求,而不仅仅是匹配关键词。
工作原理: 将你的自然语言查询转换为矢量,然后利用余弦相似度+精确匹配提升法寻找意义相似的代码块。
最适合:
- 探索陌生代码库:
"How does authentication work?" - 查找相关代码:
"Where do we validate user input?"
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Smart Coding MCP
An extensible Model Context Protocol (MCP) server that provides intelligent semantic code search for AI assistants. Built with local AI models using Matryoshka Representation Learning (MRL) for flexible embedding dimensions (64-768d).
What This Does
AI coding assistants work better when they can find relevant code quickly. Traditional keyword search falls short - if you ask “where do we handle authentication?” but your code uses “login” and “session”, keyword search misses it.
This MCP server solves that by indexing your codebase with AI embeddings. Your AI assistant can search by meaning instead of exact keywords, finding relevant code even when the terminology differs.
Available Tools
🔍 a_semantic_search - Find Code by Meaning
The primary tool for codebase exploration. Uses AI embeddings to understand what you’re looking for, not just match keywords.
How it works: Converts your natural language query into a vector, then finds code chunks with similar meaning using cosine similarity + exact match boosting.
Best for:
- Exploring unfamiliar codebases:
"How does authentication work?" - Finding related code:
"Where do we validate user input?" - Conceptual searches:
"error handling patterns" - Works even with typos:
"embeding modle initializashun"still finds embedding code
Example queries:
"Where do we handle cache persistence?"
"How is the database connection managed?"
"Find all API endpoint definitions"
📦 d_check_last_version - Package Version Lookup
Fetches the latest version of any package from its official registry. Supports 20+ ecosystems.
How it works: Queries official package registries (npm, PyPI, Crates.io, etc.) in real-time. No guessing, no stale training data.
Supported ecosystems: npm, PyPI, Crates.io, Maven, Go, RubyGems, NuGet, Packagist, Hex, pub.dev, Homebrew, Conda, and more.
Best for:
- Before adding dependencies:
"express"→4.18.2 - Checking for updates:
"pip:requests"→2.31.0 - Multi-ecosystem projects:
"npm:react","go:github.com/gin-gonic/gin"
Example usage:
"What's the latest version of lodash?"
"Check if there's a newer version of axios"
🔄 b_index_codebase - Manual Reindexing
Triggers a full reindex of your codebase. Normally not needed since indexing is automatic and incremental.
How it works: Scans all files, generates new embeddings, and updates the SQLite cache. Uses progressive indexing so you can search while it runs.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"smart-coding-mcp": {
"command": "smart-coding-mcp",
"args": ["--workspace", "/absolute/path/to/your/project"]
}
}
}