LanceDB Node
LanceDB Node.js 向量搜索
使用 LanceDB 和 Ollama 的嵌入模型进行向量搜索的 Node.js 实现。
概述
该项目演示了如何:
连接到 LanceDB 数据库
使用 Ollama 创建自定义嵌入函数
对存储的文档执行向量相似性搜索
处理并显示搜索结果
Related MCP server: MCP Tooling Lab
先决条件
Node.js(v14 或更高版本)
Ollama 使用
nomic-embed-text模型在本地运行具有读/写权限的 LanceDB 存储位置
安装
克隆存储库
安装依赖项:
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”表中搜索“如何定义成功标准”,并显示其相似度分数的结果。
执照
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
This server cannot be installed
Maintenance
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
- FlicenseNot gradedqualityDmaintenanceEnables semantic search and retrieval of information from technical documentation PDFs using RAG-powered natural language queries with Ollama embeddings and LLMs.6
- FlicenseBqualityDmaintenanceA 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
- AlicenseNot gradedqualityCmaintenanceLocal 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.28AGPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables semantic search over your Cursor IDE chat history by vectorizing prompts and storing them in LanceDB. Provides a Dockerized API to perform vector similarity searches against your chat history.4
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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