Files-DB-MCP:代码项目的向量搜索
本地向量数据库系统,通过消息控制协议(MCP)为LLM编码代理提供快速、高效的软件项目搜索功能。
特征
零配置- 使用合理的默认值自动检测项目结构
实时监控——持续监视文件变化
向量搜索——用于查找相关代码的语义搜索
MCP 接口- 兼容 Claude Code 和其他 LLM 工具
开源模型- 使用 Hugging Face 模型进行代码嵌入
安装
选项 1:克隆和设置(推荐)
选项 2:自动安装脚本
用法
安装后,在任意项目目录运行:
该服务将:
检测你的项目文件
在后台开始索引
立即开始响应 MCP 搜索查询
要求
Docker
Docker Compose
配置
Files-DB-MCP 无需配置即可运行,但您可以使用环境变量对其进行自定义:
EMBEDDING_MODEL
- 更改嵌入模型(默认值:'jinaai/jina-embeddings-v2-base-code'或项目特定模型)FAST_STARTUP
- 设置为“true”以使用较小的模型实现更快的启动(默认值:“false”)QUANTIZATION
- 启用/禁用量化(默认值:'true')BINARY_EMBEDDINGS
- 启用/禁用二进制嵌入(默认值:'false')IGNORE_PATTERNS
- 要忽略的文件/目录的逗号分隔列表
首次启动
首次运行时,Files-DB-MCP 将下载嵌入模型,这可能需要几分钟,具体取决于:
所选模型的大小(高质量模型为 300-500MB)
您的互联网连接速度
由于模型缓存在持久 Docker 卷中,后续启动速度会更快。为了加快初始启动速度,您可以:
模型缓存
Files-DB-MCP 会自动保存下载的嵌入模型,因此您只需下载一次:
模型存储在名为
model_cache
的 Docker 卷中此卷在容器重启和跨不同项目时仍然存在
您的计算机上的所有使用 Files-DB-MCP 的项目共享缓存
您无需为每个项目再次下载模型
克劳德代码集成
添加到您的 Claude 代码配置:
有关详细信息,请参阅Claude MCP 集成。
文档
存储库结构
/src
源代码/tests
单元和集成测试/docs
文档/scripts
实用脚本/install
安装脚本/.docker
配置/config
配置文件/ai-assist
- AI 辅助文件
执照
贡献
欢迎贡献!请随时提交拉取请求。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
本地向量数据库系统,通过消息控制协议为LLM编码代理提供快速、高效的软件项目语义搜索功能。
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.Last updated -61128MIT License
- AsecurityAlicenseAqualityChat with your codebase through intelligent code searching without embeddings by breaking files into logical chunks, giving the LLM tools to search these chunks, and letting it find specific code needed to answer your questions.Last updated -854MIT License
- -securityFlicense-qualityA smart code retrieval tool based on Model Context Protocol that provides efficient and accurate code repository search capabilities for large language models.Last updated -23
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setupLast updated -12372MIT License