Solr MCP

Solr MCP

A Python server that enables AI assistants to perform hybrid search queries against Apache Solr indexes through the Model Context Protocol, combining keyword precision with vector-based semantic understanding.

Category
Visit Server

README

Solr MCP

A Python package for accessing Apache Solr indexes via Model Context Protocol (MCP). This integration allows AI assistants like Claude to perform powerful search queries against your Solr indexes, combining both keyword and vector search capabilities.

Features

  • MCP Server: Implements the Model Context Protocol for integration with AI assistants
  • Hybrid Search: Combines keyword search precision with vector search semantic understanding
  • Vector Embeddings: Generates embeddings for documents using Ollama with nomic-embed-text
  • Unified Collections: Store both document content and vector embeddings in the same collection
  • Docker Integration: Easy setup with Docker and docker-compose
  • Optimized Vector Search: Efficiently handles combined vector and SQL queries by pushing down SQL filters to the vector search stage, ensuring optimal performance even with large result sets and pagination

Architecture

Vector Search Optimization

The system employs an important optimization for combined vector and SQL queries. When executing a query that includes both vector similarity search and SQL filters:

  1. SQL filters (WHERE clauses) are pushed down to the vector search stage
  2. This ensures that vector similarity calculations are only performed on documents that will match the final SQL criteria
  3. Significantly improves performance for queries with:
    • Selective WHERE clauses
    • Pagination (LIMIT/OFFSET)
    • Large result sets

This optimization reduces computational overhead and network transfer by minimizing the number of vector similarity calculations needed.

Quick Start

  1. Clone this repository
  2. Start SolrCloud with Docker:
    docker-compose up -d
    
  3. Install dependencies:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install poetry
    poetry install
    
  4. Process and index the sample document:
    python scripts/process_markdown.py data/bitcoin-whitepaper.md --output data/processed/bitcoin_sections.json
    python scripts/create_unified_collection.py unified
    python scripts/unified_index.py data/processed/bitcoin_sections.json --collection unified
    
  5. Run the MCP server:
    poetry run python -m solr_mcp.server
    

For more detailed setup and usage instructions, see the QUICKSTART.md guide.

Requirements

  • Python 3.10 or higher
  • Docker and Docker Compose
  • SolrCloud 9.x
  • Ollama (for embedding generation)

License

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

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured