Skip to main content

LanceDB MCP Server for vector database operations

Project description

LanceDB MCP Server

Overview

A Model Context Protocol (MCP) server implementation for LanceDB vector database operations. This server enables efficient vector storage, similarity search, and management of vector embeddings with associated metadata.

Components

Resources

The server exposes vector database tables as resources:

  • table://{name}: A vector database table that stores embeddings and metadata
    • Configurable vector dimensions
    • Text metadata support
    • Efficient similarity search capabilities

API Endpoints

Table Management

  • POST /table
    • Create a new vector table
    • Input:
      {
        "name": "my_table",      # Table name
        "dimension": 768         # Vector dimension
      }
      

Vector Operations

  • POST /table/{table_name}/vector

    • Add vector data to a table
    • Input:
      {
        "vector": [0.1, 0.2, ...],  # Vector data
        "text": "associated text"    # Metadata
      }
      
  • POST /table/{table_name}/search

    • Search for similar vectors
    • Input:
      {
        "vector": [0.1, 0.2, ...],  # Query vector
        "limit": 10                  # Number of results
      }
      

Installation

# Clone the repository
git clone https://github.com/yourusername/lancedb_mcp.git
cd lancedb_mcp

# Install dependencies using uv
uv pip install -e .

Usage with Claude Desktop

# Add the server to your claude_desktop_config.json
"mcpServers": {
  "lancedb": {
    "command": "uv",
    "args": [
      "run",
      "python",
      "-m",
      "lancedb_mcp",
      "--db-path",
      "~/.lancedb"
    ]
  }
}

Development

# Install development dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Format code
black .
ruff .

Environment Variables

  • LANCEDB_URI: Path to LanceDB storage (default: ".lancedb")

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_lancedb_mcp-0.1.0.tar.gz (96.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_lancedb_mcp-0.1.0-py3-none-any.whl (79.2 kB view details)

Uploaded Python 3

File details

Details for the file mseep_lancedb_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: mseep_lancedb_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 96.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_lancedb_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d8af479b1bf7de71e1e9065f1f9f65c3f39995fd276f18b6fba67d6c9df05dd
MD5 4b0207ff68fd6f105657fa7a202867e4
BLAKE2b-256 8b762e027773757fe819bc7980eac98cd52ca713d2c5697ff3a259cac9184c63

See more details on using hashes here.

File details

Details for the file mseep_lancedb_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_lancedb_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b507c14eb4d116495d4cf53a3da4020e10f87d09af43a06a99f454592a71f319
MD5 e95ca1ec5bea1872d0c33ef63be1ea4b
BLAKE2b-256 72ec9a3f995f6e3fc7fdfe686ccdfad472701ada032d0501e61eae200f20b592

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page