mcp-lance-db logo

mcp-lance-db

by kyryl-opens-ml

This repository provides an example of creating a Model Context Protocol (MCP) server for LanceDB, an embedded vector database. It enables seamless integration between LLM applications and LanceDB for storing and retrieving memories.

View on GitHub

Last updated: N/A

What is mcp-lance-db?

A basic Model Context Protocol server for storing and retrieving memories in the LanceDB vector database. It acts as a semantic memory layer that allows storing text with vector embeddings for later retrieval.

How to use mcp-lance-db?

The server implements two tools: 'add-memory' to add new memories with content as a string argument, and 'search-memories' to retrieve semantically similar memories based on a query string argument, with an optional limit parameter. Configuration includes database path, collection name, embedding provider, model, device, and similarity threshold. To use it with Claude Desktop, configure the claude_desktop_config.json file with the command and arguments to run the server.

Key features of mcp-lance-db

  • Stores text with vector embeddings

  • Retrieves semantically similar memories

  • Implements 'add-memory' and 'search-memories' tools

  • Configurable database path, collection name, and embedding model

  • Integrates with Claude Desktop

  • Uses LanceDB for vector storage

Use cases of mcp-lance-db

  • AI-powered IDEs

  • Enhanced chat interfaces

  • Custom AI workflows

  • Semantic memory for LLMs

  • Contextual information retrieval

FAQ from mcp-lance-db

What is MCP?

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools.

What is LanceDB?

LanceDB is an embedded vector database.

What embedding provider is used?

The default embedding provider is 'sentence-transformers' with the model 'BAAI/bge-small-en-v1.5'.

What tools are implemented?

The server implements 'add-memory' and 'search-memories' tools.

How can I debug the server?

It is recommended to use the MCP Inspector for debugging. You can launch it via npx @modelcontextprotocol/inspector uv --directory $(PWD) run mcp-lance-db.