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.1.tar.gz (3.8 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.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mseep_lancedb_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 044cca005240e710bb349a24f7f18bc6ce5d659397ca6b98abc4457a784b32ef
MD5 223831cf1b9d38e2bfe56cd459ce0195
BLAKE2b-256 4dd67eefd5b1608252164578faa73c6f76694d1a531ede75063da8a7bcf445f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mseep_lancedb_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a60e1af0fd459a3c40b874e76e43f91dcebd64a610213346397e5eb24e321aa5
MD5 f97bc00486817fb9aeb97887b1f1bc2e
BLAKE2b-256 16c333abcbbaeffbcaa6124250aa0b512d8482db67151e0bbfe29dcbcecfc032

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