local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Used for the default summarization and embedding models required by the server, specifically the snowflake-arctic-embed2 and llama3.1:8b models.
Referenced in the embedding model 'snowflake-arctic-embed2' that is used by default for document embedding.
🗄️ LLMS 的 LanceDB MCP 服务器
模型上下文协议 (MCP) 服务器,使 LLM 能够通过代理 RAG 和 LanceDB 中的混合搜索直接与磁盘上的文档进行交互。您可以向 LLM 询问有关整个数据集或特定文档的问题。
✨ 特点
- 🔍 由 LanceDB 提供支持的无服务器矢量索引和文档摘要目录。
- 📊 高效使用 LLM 令牌。LLM 会在需要时自行查找所需内容。
- 📈 安全性。索引存储在本地,因此使用本地 LLM 时不会将任何数据传输到云端。
🚀 快速入门
首先,创建一个本地目录来存储索引,并将此配置添加到您的 Claude Desktop 配置文件中:
MacOS : ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows : %APPDATA%/Claude/claude_desktop_config.json
先决条件
- Node.js 18+
- NPX
- MCP 客户端(例如 Claude 桌面应用程序)
- 安装了摘要和嵌入模型(参见 config.ts - 默认情况下我们使用 Ollama 模型)
ollama pull snowflake-arctic-embed2
ollama pull llama3.1:8b
演示
本地开发模式:
使用npm run build
来构建项目。
使用npx @modelcontextprotocol/inspector dist/index.js PATH_TO_LOCAL_INDEX_DIR
运行 MCP 工具检查器。
种子数据
种子脚本会在 LanceDB 中创建两个表,一个用于存储文档摘要目录,另一个用于存储矢量化文档的分块。要运行种子脚本,请使用以下命令:
您可以使用 docs/ 目录中的示例数据。您可以随意在 config.ts 文件中调整默认的摘要和嵌入模型。如果您需要重新创建索引,只需使用--overwrite
选项重新运行种子脚本即可。
目录
- 文档摘要
- 元数据
块
- 矢量化文档块
- 元数据
🎯 示例提示
尝试与 Claude 一起执行这些提示来探索其功能:
📝 可用工具
服务器提供了这些工具来与索引进行交互:
目录工具
catalog_search
:在目录中搜索相关文档
块工具
chunks_search
:根据目录中的特定文档查找相关块all_chunks_search
:从所有已知文档中查找相关块
📜 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
This server cannot be installed
模型上下文协议 (MCP) 服务器,使 LLM 能够通过代理 RAG 和 LanceDB 中的混合搜索直接与磁盘上的文档进行交互。您可以向 LLM 询问有关整个数据集或特定文档的问题。