文件向量搜索
STDIO提供文件语义搜索的向量存储服务器
提供文件语义搜索的向量存储服务器
A Model Context Protocol (MCP) server that provides semantic search capabilities across files. This server watches specified directories and creates vector embeddings of file contents, enabling semantic search across your documents.
Add to your MCP settings file:
{ "mcpServers": { "files-vectorstore": { "command": "npx", "args": [ "-y", "@lishenxydlgzs/simple-files-vectorstore" ], "env": { "WATCH_DIRECTORIES": "/path/to/your/directories" }, "disabled": false, "autoApprove": [] } } }
MCP settings file locations:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
~/Library/Application Support/Claude/claude_desktop_config.json
The server requires configuration through environment variables:
You must specify directories to watch using ONE of the following methods:
WATCH_DIRECTORIES
: Comma-separated list of directories to watchWATCH_CONFIG_FILE
: Path to a JSON configuration file with a watchList
arrayExample using 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": [] } } }
Example using 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": [] } } }
The watch config file should have the following structure:
{ "watchList": [ "/path/to/dir1", "/path/to/dir2", "/path/to/specific/file.txt" ] }
CHUNK_SIZE
: Size of text chunks for processing (default: 1000)CHUNK_OVERLAP
: Overlap between chunks (default: 200)IGNORE_FILE
: Path to a .gitignore style file to exclude files/directories based on patternsExample with all optional parameters:
{ "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": [] } } }
This server provides the following MCP tools:
Perform semantic search across indexed files.
Parameters:
query
(required): The search query stringlimit
(optional): Maximum number of results to return (default: 5, max: 20)Example response:
[ { "content": "matched text content", "source": "/path/to/file", "fileType": "markdown", "score": 0.85 } ]
Get statistics about indexed files.
Parameters: None
Example response:
{ "totalDocuments": 42, "watchedDirectories": ["/path/to/docs"], "processingFiles": [] }