Skip to main content
Glama

Files-DB-MCP

by randomm

Files-DB-MCP:代码项目的向量搜索

本地向量数据库系统,通过消息控制协议(MCP)为LLM编码代理提供快速、高效的软件项目搜索功能。

特征

  • 零配置- 使用合理的默认值自动检测项目结构
  • 实时监控——持续监视文件变化
  • 向量搜索——用于查找相关代码的语义搜索
  • MCP 接口- 兼容 Claude Code 和其他 LLM 工具
  • 开源模型- 使用 Hugging Face 模型进行代码嵌入

安装

选项 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

该服务将:

  1. 检测你的项目文件
  2. 在后台开始索引
  3. 立即开始响应 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 辅助文件

执照

MIT 许可证

贡献

欢迎贡献!请随时提交拉取请求。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

本地向量数据库系统,通过消息控制协议为LLM编码代理提供快速、高效的软件项目语义搜索功能。

  1. 特征
    1. 安装
      1. 选项 1:克隆和设置(推荐)
      2. 选项 2:自动安装脚本
    2. 用法
      1. 要求
        1. 配置
          1. 首次启动
          2. 模型缓存
        2. 克劳德代码集成
          1. 文档
            1. 存储库结构
              1. 执照
                1. 贡献

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    Provides a semantic memory layer that integrates LLMs with OpenSearch, enabling storage and retrieval of memories within the OpenSearch engine.
                    Last updated -
                    Python
                    Apache 2.0
                  • A
                    security
                    A
                    license
                    A
                    quality
                    Chat 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 -
                    8
                    51
                    Python
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    An integration server implementing the Model Context Protocol that enables LLM applications to interact with Milvus vector database functionality, allowing vector search, collection management, and data operations through natural language.
                    Last updated -
                    133
                    Python
                    Apache 2.0
                    • Apple
                  • -
                    security
                    -
                    license
                    -
                    quality
                    A long-term memory storage system for LLMs that helps them remember context across multiple sessions using semantic search with embeddings to provide relevant historical information from past interactions and development decisions.
                    Last updated -
                    3
                    TypeScript
                    MIT License

                  View all related MCP servers

                  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