Skip to main content
Glama

mcp-lance-db: A LanceDB MCP server

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.

This repository is an example of how to create a MCP server for LanceDB, an embedded vector database.

Overview

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.

Related MCP server: Qdrant MCP Server

Components

Tools

The server implements two tools:

  • add-memory: Adds a new memory to the vector database

    • Takes "content" as a required string argument

    • Stores the text with vector embeddings for later retrieval

  • search-memories: Retrieves semantically similar memories

    • Takes "query" as a required string argument

    • Optional "limit" parameter to control number of results (default: 5)

    • Returns memories ranked by semantic similarity to the query

    • Updates server state and notifies clients of resource changes

Configuration

The server uses the following configuration:

  • Database path: "./lancedb"

  • Collection name: "memories"

  • Embedding provider: "sentence-transformers"

  • Model: "BAAI/bge-small-en-v1.5"

  • Device: "cpu"

  • Similarity threshold: 0.7 (upper bound for distance range)

Quickstart

Claude Desktop

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

{
  "lancedb": {
    "command": "uvx",
    "args": [
      "mcp-lance-db"
    ]
  }
}

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:

uv sync
  1. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:

uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN

  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory $(PWD) run mcp-lance-db

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Available Tools

2 tools
add_memoryC

Add a new memory to the vector database Args: content: Content of the memory

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, and the description does not disclose any behavioral traits such as idempotency, side effects, or permissions. The tool simply states it adds a memory without elaboration.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short and to the point, with no unnecessary information. However, it could be slightly more informative without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a single parameter, the description lacks completeness. It does not explain return values, side effects, or any additional context needed for safe usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description only restates the parameter name and type ('content: Content of the memory'), adding no meaning beyond the input schema. With 0% schema coverage, the description should compensate but fails to do so.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool adds a new memory to the vector database, with a specific verb and resource. It is distinct from the sibling tool 'search_memories' which searches rather than adds.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like search_memories. There is no context about prerequisites or conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_memoriesC

Search memories using semantic similarity Args: query: The search query limit: Maximum number of results to return

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description fails to disclose behavioral traits beyond the basic operation. It does not mention whether the tool is read-only, requires authentication, or has any side effects, leaving the agent uninformed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is overly brief, consisting only of a one-line summary and parameter list. While concise, it lacks necessary detail and structure, making it under-specified rather than efficiently concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and no output schema, the description is still incomplete. It does not explain what 'semantic similarity' entails, what the result format is, or any limitations, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description merely restates the parameter names and types ('query: The search query', 'limit: Maximum number of results to return') without adding semantic value beyond the schema. With 0% schema coverage, this is insufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Search memories using semantic similarity'. It uses a specific verb ('search') and resource ('memories'), and distinguishes from the sibling 'add_memory' which serves a different purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when or when not to use this tool. While the sibling 'add_memory' suggests a clear alternative, the description does not provide explicit context or exclusions for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.6
    • First observedadd_memory
    • First observedsearch_memories

TDQS

B3/5.0
Disambiguation5/5

The two tools have completely distinct purposes: one adds a memory, the other searches. There is no overlap or ambiguity.

Naming Consistency5/5

Both tools follow the consistent verb_noun snake_case pattern: add_memory and search_memories. No deviations.

Tool Count3/5

With only 2 tools, the server covers basic add and search functionality, but feels thin. It is borderline appropriate given the minimal scope.

Completeness2/5

The domain of a memory store expects operations like delete or update, which are missing. The tool set covers only creation and retrieval, leaving significant gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides AI agents with persistent long-term memory capabilities using semantic search. Enables storing, retrieving, and searching memories through three core tools integrated with Mem0 and vector storage.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables storing and retrieving information using semantic search with Qdrant vector database. Acts as a memory layer for LLMs to persistently store and semantically search through information and metadata.
    Apache 2.0
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides AI agents with database-like operations over LanceDB with automatic BGE-M3 multilingual embedding generation, enabling semantic search, CRUD operations, and safe schema migrations across structured data.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides local vector-based semantic memory storage for AI assistants to persist context and decisions across sessions using local embeddings and LanceDB. It enables private semantic search and session handoff capabilities to maintain long-term project context.
    70
    5
    MIT

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/kyryl-opens-ml/mcp-server-lancedb'

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