- Home
- MCP servers
- LanceDB
LanceDB
- python
6
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ryanlisse-lancedb_mcp": {
"command": "uv",
"args": [
"run",
"python",
"-m",
"lancedb_mcp",
"--db-path",
"~/.lancedb"
],
"env": {
"LANCEDB_URI": "~/.lancedb"
}
}
}
}LanceDB MCP Server provides a Model Context Protocol (MCP) interface to manage LanceDB vector databases. It enables creating vector tables, storing embeddings with metadata, and performing efficient similarity searches, all accessible through MCP endpoints or a local runtime that you can start and connect to from your MCP client.
How to use
You will run the LanceDB MCP Server locally or connect to a hosted MCP endpoint, then perform three core actions from your MCP client: create a vector table, add vectors with associated text metadata, and search for vectors similar to a query. Use these capabilities to organize embeddings by table, manage metadata, and retrieve relevant results quickly.
How to install
Prerequisites you need before installation: Python and a runtime environment that can execute Python modules, and a tool to run MCP servers locally (uvx). You'll install the server, then start it so your MCP client can talk to it.
Install and run the LanceDB MCP Server with the following steps.
# Copy the repository locally
# git clone https://github.com/yourusername/lancedb_mcp.git
# cd lancedb_mcp
# Install dependencies using uvx
uv pip install -e .
Note: The server is started as a Python module, so you will typically run it via Python in combination with uvx tooling as shown in usage examples.
## Configuration and runtime usage
For everyday usage, you run the MCP server as a local stdio service that your MCP client can connect to. The following snippet shows a typical runtime configuration you would place in your MCP client setup (for Claude Desktop) to point to a local LanceDB instance.
"mcpServers": { "lancedb": { "command": "uv", "args": [ "run", "python", "-m", "lancedb_mcp", "--db-path", "~/.lancedb" ] } }
## Environment variables
You can configure the database path for LanceDB using an environment variable. The default path is ".lancedb" if you do not override it.
LANCEDB_URI=~/.lancedb
## Endpoints and how they map to actions
The server exposes a set of resources you interact with via MCP calls. You can create a table, add vectors with text metadata, and search by vector similarity. The key actions are mapped to the following operations.
## Additional notes
- The server stores embeddings and metadata per table with configurable vector dimensions.
- Text metadata is supported to enrich search results.
- Similarity search returns the most relevant vectors up to your requested limit.
## Development
If you are contributing, install development dependencies and run tests to ensure changes behave as expected.
Install development dependencies
uv pip install -e ".[dev]"
Run tests
pytest
Format code
black . ruff .
## Available tools
### CreateTable
Create a new vector table with a defined name and vector dimension to store embeddings and metadata.
### AddVector
Add a vector to a specific table along with associated text metadata for later retrieval.
### SearchVectors
Query a table with a vector to retrieve similar vectors and associated metadata, up to a specified limit.