lance-mcp

The LanceDB MCP server provides a Model Context Protocol that allows LLMs to interact directly with documents stored locally. Through agentic RAG and hybrid search, users can ask questions about the entire dataset or specific documents. Security is ensured as data is stored locally, preventing any cloud transfer.

GitHub Stars

71

User Rating

Not Rated

Favorites

0

Views

26

Forks

14

Issues

5

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Node.js 18+
npx
+2 more

Installation

Installation

Prerequisites

Please specify required software and versions:
Node.js: 18.0.0 or higher
npm: 8.0.0 or higher
Claude Desktop: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/adiom-data/lance-mcp
cd lance-mcp

2. Install Dependencies

bash
npm install

3. Configure Claude Desktop

Edit claude_desktop_config.json to add the MCP server:
json
{
  "mcpServers": {
    "lancedb": {
      "command": "npx",
      "args": ["lance-mcp", "PATH_TO_LOCAL_INDEX_DIR"]
    }
  }
}

4. Start Server

bash
npm start

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Not recognized by Claude Desktop Solution: Verify configuration file path and syntax.

Configuration

Configuration

Basic Configuration

Claude Desktop Setup

Edit ~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
  "mcpServers": {
    "lancedb": {
      "command": "npx",
      "args": ["lance-mcp", "PATH_TO_LOCAL_INDEX_DIR"]
    }
  }
}

Environment Variables

Set the following environment variables as needed:
bash
export API_KEY="your-api-key"
export DEBUG="true"

Examples

Examples

Basic Usage

Using with Claude Desktop

1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands

   Available tools from this MCP server:
   - catalog_search: Search for relevant documents in the catalog
   - chunks_search: Find relevant documents in chunks
   

Programmatic Usage

javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// Execute tool
const result = await client.callTool('catalog_search', {
  query: 'sample query'
});

console.log(result);

Use Cases

Retrieve summaries of specific documents using an LLM.
Pose questions to the LLM about the entire dataset.
Perform searches on documents stored locally.
Create automation scripts to process multiple documents at once.
Invoke MCP tools from other applications through API integration.

Additional Resources