Simple Files Vector Store Server

by lishenxydlgzs
Verified

local-only server

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

Integrations

  • Supports .gitignore-style file exclusion patterns through the IGNORE_FILE configuration to control which files are indexed.

  • Supports indexing and searching Markdown files, allowing semantic queries across Markdown document content.

@lishenxydlgzs/简单文件矢量存储

提供跨文件语义搜索功能的模型上下文协议 (MCP) 服务器。该服务器监视指定目录并创建文件内容的向量嵌入,从而支持跨文档的语义搜索。

安装与使用

添加到您的 MCP 设置文件:

{ "mcpServers": { "files-vectorstore": { "command": "npx", "args": [ "-y", "@lishenxydlgzs/simple-files-vectorstore" ], "env": { "WATCH_DIRECTORIES": "/path/to/your/directories" }, "disabled": false, "autoApprove": [] } } }

MCP 设置文件位置:

  • VSCode Cline 扩展: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Claude 桌面应用程序: ~/Library/Application Support/Claude/claude_desktop_config.json

配置

服务器需要通过环境变量进行配置:

必需的环境变量

您必须使用以下方法之一指定要监视的目录:

  • WATCH_DIRECTORIES :要监视的目录的逗号分隔列表
  • WATCH_CONFIG_FILE :带有watchList数组的 JSON 配置文件的路径

使用 WATCH_DIRECTORIES 的示例:

{ "mcpServers": { "files-vectorstore": { "command": "npx", "args": [ "-y", "@lishenxydlgzs/simple-files-vectorstore" ], "env": { "WATCH_DIRECTORIES": "/path/to/dir1,/path/to/dir2" }, "disabled": false, "autoApprove": [] } } }

使用 WATCH_CONFIG_FILE 的示例:

{ "mcpServers": { "files-vectorstore": { "command": "npx", "args": [ "-y", "@lishenxydlgzs/simple-files-vectorstore" ], "env": { "WATCH_CONFIG_FILE": "/path/to/watch-config.json" }, "disabled": false, "autoApprove": [] } } }

监视配置文件应具有以下结构:

{ "watchList": [ "/path/to/dir1", "/path/to/dir2", "/path/to/specific/file.txt" ] }

可选环境变量

  • CHUNK_SIZE :要处理的文本块的大小(默认值:1000)
  • CHUNK_OVERLAP :块之间的重叠(默认值:200)
  • IGNORE_FILE :.gitignore 样式文件的路径,用于根据模式排除文件/目录

包含所有可选参数的示例:

{ "mcpServers": { "files-vectorstore": { "command": "npx", "args": [ "-y", "@lishenxydlgzs/simple-files-vectorstore" ], "env": { "WATCH_DIRECTORIES": "/path/to/dir1,/path/to/dir2", "CHUNK_SIZE": "2000", "CHUNK_OVERLAP": "500", "IGNORE_FILE": "/path/to/.gitignore" }, "disabled": false, "autoApprove": [] } } }

MCP 工具

该服务器提供以下 MCP 工具:

1. 搜索

对索引文件执行语义搜索。

参数:

  • query (必需):搜索查询字符串
  • limit (可选):返回的最大结果数(默认值:5,最大值:20)

响应示例:

[ { "content": "matched text content", "source": "/path/to/file", "fileType": "markdown", "score": 0.85 } ]

2. 获取统计数据

获取有关索引文件的统计信息。

参数:无

响应示例:

{ "totalDocuments": 42, "watchedDirectories": ["/path/to/docs"], "processingFiles": [] }

特征

  • 实时文件查看和索引
  • 使用向量嵌入进行语义搜索
  • 支持多种文件类型
  • 可配置的块大小和重叠
  • 文件的后台处理
  • 自动处理文件更改和删除

存储库

GitHub 存储库

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

一个非常简单的矢量存储,提供监视目录列表的功能,并自动将目录中的所有 markdown、html 和文本文件索引到矢量存储以增强上下文。

  1. Installation & Usage
    1. Configuration
      1. Required Environment Variables
      2. Optional Environment Variables
    2. MCP Tools
      1. 1. search
      2. 2. get_stats
    3. Features
      1. Repository
        ID: 8az6gm4zz3