Files-DB-MCP
Files-DB-MCP:代码项目的向量搜索
本地向量数据库系统,通过消息控制协议(MCP)为LLM编码代理提供快速、高效的软件项目搜索功能。
特征
零配置- 使用合理的默认值自动检测项目结构
实时监控——持续监视文件变化
向量搜索——用于查找相关代码的语义搜索
MCP 接口- 兼容 Claude Code 和其他 LLM 工具
开源模型- 使用 Hugging Face 模型进行代码嵌入
Related MCP server: MCPunk
安装
选项 1:克隆和设置(推荐)
# Using SSH (recommended if you have SSH keys set up with GitHub)
git clone git@github.com:randomm/files-db-mcp.git ~/.files-db-mcp && bash ~/.files-db-mcp/install/setup.sh
# Using HTTPS (if you don't have SSH keys set up)
git clone https://github.com/randomm/files-db-mcp.git ~/.files-db-mcp && bash ~/.files-db-mcp/install/setup.sh选项 2:自动安装脚本
curl -fsSL https://raw.githubusercontent.com/randomm/files-db-mcp/main/install/install.sh | bash用法
安装后,在任意项目目录运行:
files-db-mcp该服务将:
检测你的项目文件
在后台开始索引
立即开始响应 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 卷中,后续启动速度会更快。为了加快初始启动速度,您可以:
# Use a smaller, faster model (90MB)
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2 files-db-mcp
# Or enable fast startup mode
FAST_STARTUP=true files-db-mcp模型缓存
Files-DB-MCP 会自动保存下载的嵌入模型,因此您只需下载一次:
模型存储在名为
model_cache的 Docker 卷中此卷在容器重启和跨不同项目时仍然存在
您的计算机上的所有使用 Files-DB-MCP 的项目共享缓存
您无需为每个项目再次下载模型
克劳德代码集成
添加到您的 Claude 代码配置:
{
"mcpServers": {
"files-db-mcp": {
"command": "python",
"args": ["/path/to/src/claude_mcp_server.py", "--host", "localhost", "--port", "6333"]
}
}
}有关详细信息,请参阅Claude MCP 集成。
文档
存储库结构
/src源代码/tests单元和集成测试/docs文档/scripts实用脚本/install安装脚本/.docker配置/config配置文件/ai-assist- AI 辅助文件
执照
贡献
欢迎贡献!请随时提交拉取请求。
This server cannot be installed
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/randomm/files-db-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server