Skip to main content
Glama
vurtnec

LanceDB Node

by vurtnec

LanceDB Node.js ベクター検索

LanceDB と Ollama の埋め込みモデルを使用したベクトル検索の Node.js 実装。

概要

このプロジェクトでは、次の方法を説明します。

  • LanceDBデータベースに接続する

  • Ollamaを使用してカスタム埋め込み関数を作成する

  • 保存されたドキュメントに対してベクトル類似性検索を実行する

  • 検索結果を処理して表示する

Related MCP server: MCP Tooling Lab

前提条件

  • Node.js (v14以降)

  • Ollama はnomic-embed-textモデルを使用してローカルで実行されています

  • 読み取り/書き込み権限を持つLanceDBの保存場所

インストール

  1. リポジトリをクローンする

  2. 依存関係をインストールします:

pnpm install

依存関係

  • @lancedb/lancedb : Node.js 用の LanceDB クライアント

  • apache-arrow : 列指向データの処理用

  • node-fetch : OllamaへのAPI呼び出しを行うため

使用法

ベクトル検索テスト スクリプトを実行します。

pnpm test-vector-search

または直接実行します:

node test-vector-search.js

構成

スクリプトは以下に接続します:

  • 設定されたパスのLanceDB

  • Ollama API ( http://localhost:11434/api/embeddings

MCP構成

Claude Desktop を MCP サービスとして統合するには、MCP 構成 JSON に以下を追加します。

{
  "mcpServers": {
    "lanceDB": {
      "command": "node",
      "args": [
        "/path/to/lancedb-node/dist/index.js",
        "--db-path",
        "/path/to/your/lancedb/storage"
      ]
    }
  }
}

パスを実際のインストール パスに置き換えます。

  • /path/to/lancedb-node/dist/index.js - コンパイルされた index.js ファイルへのパス

  • /path/to/your/lancedb/storage - LanceDB ストレージディレクトリへのパス

カスタム埋め込み機能

このプロジェクトには、次の機能を備えたカスタムOllamaEmbeddingFunctionが含まれています。

  • Ollama APIにテキストを送信します

  • 768次元の埋め込みを受け取る

  • LanceDB で使用できるようにフォーマットします

ベクトル検索の例

この例では、「ai-rag」テーブルで「成功基準の定義方法」を検索し、類似度スコアとともに結果を表示します。

ライセンス

MITライセンス

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables semantic search and retrieval of information from technical documentation PDFs using RAG-powered natural language queries with Ollama embeddings and LLMs.
    6
  • F
    license
    B
    quality
    D
    maintenance
    A Node.js-based MCP server that enables AI agents to generate embeddings, index documents, and perform semantic vector searches using OpenAI and Chroma. It facilitates the creation of retrieval-augmented generation (RAG) pipelines for internal knowledge assistants and document-based workflows.
    3
  • A
    license
    Not graded
    quality
    C
    maintenance
    Local offline semantic search over documents (txt, md, pdf, docx, pptx, csv). Indexes folders into a LanceDB vector database with multilingual embeddings and supports hybrid vector + keyword search via Reciprocal Rank Fusion. No API keys, no cloud, no Docker required.
    28
    AGPL 3.0

View all related MCP servers

Related MCP Connectors

  • Persistent semantic memory for AI agents: store and recall text by meaning (RAG). x402

  • Persistent memory for AI agents. Search, store, and recall across sessions.

  • Mem0-compatible persistent memory for AI agents: write facts once, recall them semantically.

View all MCP Connectors

Latest Blog Posts

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/vurtnec/mcp-LanceDB-node'

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