AD

adiom-data/lance-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

78 stars 19 forks 品質 64 トレンド 14MIT

adiom-data/lance-mcp は [https://github.com/adiom-data/lance-mcp.] からインポートされた MCP サーバー候補です

概要

adiom-data/lance-mcp は [https://github.com/adiom-data/lance-mcp.] からインポートされた MCP サーバー候補です

概要(AI 翻訳)

LLM がエージェント RAG と LanceDB のハイブリッド検索を通じてオンディスクを持っているドキュメントを直接やり取りできるモデルコンテキストプロトコル (MCP) サーバー。 LLM は、データセット全体または特定の文書に関する質問をします。

✨ 機能

  • ANSI LanceDB搭載サーバーレスベクターインデックスとドキュメントサマリーカタログ。
  • LLMトークンの効率的な使用。 LLM自体は、必要なときに必要なものを調べます。
  • セキュリティ インデックスはローカルに保存されるため、ローカルLLMを使用する場合はクラウドにデータが転送されません。

すぐにスタート

開始するには、インデックスを保存し、Claude Desktop config ファイルにこの設定を追加します。

MacOS: [~/Library/Application\ Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

前提条件

  • Node.js 18 +
  • npxの
  • MCPクライアント(Claudeデスクトップアプリなど)
  • Summarization と埋め込みモデルをインストール (config.ts を参照してください。デフォルトでは Ollama モデルを使用します)
  • [ollama pull snowflake-arctic-embed2
  • [ollama pull llama3.1:8b

デモ

ローカル開発モード:

npm run build を使ってプロジェクトをビルドします。

`npx @modelcontextprotocol/inspector dist/index を使用します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

🗄️ LanceDB MCP Server for LLMS

A Model Context Protocol (MCP) server that enables LLMs to interact directly the documents that they have on-disk through agentic RAG and hybrid search in LanceDB. Ask LLMs questions about the dataset as a whole or about specific documents.

✨ Features

  • 🔍 LanceDB-powered serverless vector index and document summary catalog.
  • 📊 Efficient use of LLM tokens. The LLM itself looks up what it needs when it needs.
  • 📈 Security. The index is stored locally so no data is transferred to the Cloud when using a local LLM.

🚀 Quick Start

To get started, create a local directory to store the index and add this configuration to your Claude Desktop config file:

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"
      ]
    }
  }
}

Prerequisites

  • Node.js 18+
  • npx
  • MCP Client (Claude Desktop App for example)
  • Summarization and embedding models installed (see config.ts - by default we use Ollama models)
    • ollama pull snowflake-arctic-embed2
    • ollama pull llama3.1:8b

Demo

Local Development Mode:

{
  "mcpServers": {
    "lancedb": {
      "command": "node",
      "args": [
        "PATH_TO_LANCE_MCP/dist/index.js",
        "PATH_TO_LOCAL_INDEX_DIR"
      ]
    }
  }
}

Use npm run build to build the project.

Use npx @modelcontextprotocol/inspector dist/index.js PATH_TO_LOCAL_INDEX_DIR to run the MCP tool inspector.

Seed Data

The seed script creates two tables in LanceDB - one for the catalog of document summaries, and another one - for vectorized documents’ chunks. To run the seed script use the following command:

npm run seed -- --dbpath  --filesdir 

You can use sample data from the docs/ directory. Feel free to adjust the default summarization and embedding models in the config.ts file. If you need to recreate the index, simply rerun the seed script with the --overwrite option.

Catalog

  • Document summary
  • Metadata

Chunks

  • Vectorized document chunk
  • Metadata

🎯 Example Prompts

Try these prompts with Claude to explore the functionality:

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

📝 Available Tools

The server provides these tools for interaction with the index:

Catalog Tools

  • catalog_search: Search for relevant documents in the catalog

Chunks Tools

GitHub で README 全文を見る

インストール

npx lance-mcp PATH_TO_LOCAL_INDEX_DIR
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

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