Skip to main content
Glama

mcp-lancedb

by adiom-data

🗄️ 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

{ "mcpServers": { "lancedb": { "command": "npx", "args": [ "lance-mcp", "PATH_TO_LOCAL_INDEX_DIR" ] } } }

先决条件

  • Node.js 18+
  • NPX
  • MCP 客户端(例如 Claude 桌面应用程序)
  • 安装了摘要和嵌入模型(参见 config.ts - 默认情况下我们使用 Ollama 模型)
    • ollama pull snowflake-arctic-embed2
    • ollama pull llama3.1:8b

演示

本地开发模式:
{ "mcpServers": { "lancedb": { "command": "node", "args": [ "PATH_TO_LANCE_MCP/dist/index.js", "PATH_TO_LOCAL_INDEX_DIR" ] } } }

使用npm run build来构建项目。

使用npx @modelcontextprotocol/inspector dist/index.js PATH_TO_LOCAL_INDEX_DIR运行 MCP 工具检查器。

种子数据

种子脚本会在 LanceDB 中创建两个表,一个用于存储文档摘要目录,另一个用于存储矢量化文档的分块。要运行种子脚本,请使用以下命令:

npm run seed -- --dbpath <PATH_TO_LOCAL_INDEX_DIR> --filesdir <PATH_TO_DOCS>

您可以使用 docs/ 目录中的示例数据。您可以随意在 config.ts 文件中调整默认的摘要和嵌入模型。如果您需要重新创建索引,只需使用--overwrite选项重新运行种子脚本即可。

目录
  • 文档摘要
  • 元数据
  • 矢量化文档块
  • 元数据

🎯 示例提示

尝试与 Claude 一起执行这些提示来探索其功能:

"What documents do we have in the catalog?" "Why is the US healthcare system so broken?"

📝 可用工具

服务器提供了这些工具来与索引进行交互:

目录工具

  • catalog_search :在目录中搜索相关文档

块工具

  • chunks_search :根据目录中的特定文档查找相关块
  • all_chunks_search :从所有已知文档中查找相关块

📜 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
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.

模型上下文协议 (MCP) 服务器,使 LLM 能够通过代理 RAG 和 LanceDB 中的混合搜索直接与磁盘上的文档进行交互。您可以向 LLM 询问有关整个数据集或特定文档的问题。

  1. ✨ 特点
    1. 🚀 快速入门
      1. 先决条件
      2. 演示
      3. 种子数据
    2. 🎯 示例提示
      1. 📝 可用工具
        1. 目录工具
        2. 块工具
      2. 📜 许可证

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.
          Last updated -
          340
          75
          TypeScript
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol (MCP) compliant server that allows Large Language Models (LLMs) to search and retrieve content from microCMS APIs.
          Last updated -
          TypeScript
          MIT License
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol (MCP) server that enables Claude or other LLMs to fetch content from URLs, supporting HTML, JSON, text, and images with configurable request parameters.
          Last updated -
          Python
          MIT License
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases, allowing them to query collections, inspect schemas, and manage data seamlessly through natural language.
          Last updated -
          340
          MIT License
          • Apple

        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/adiom-data/lance-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server