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:
- SQL filters (WHERE clauses) are pushed down to the vector search stage
- This ensures that vector similarity calculations are only performed on documents that will match the final SQL criteria
- 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
- Clone this repository
- Start SolrCloud with Docker:
- Install dependencies:
- Process and index the sample document:
- Run the 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.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
모델 컨텍스트 프로토콜을 통해 Apache Solr 인덱스에 대한 하이브리드 검색 쿼리를 수행할 수 있는 AI 보조 기능을 제공하는 Python 서버로, 키워드 정확도와 벡터 기반 의미 이해를 결합합니다.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to perform web searches using SearXNG, a privacy-respecting metasearch engine.Last updated -119JavaScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to perform real-time web searches, retrieving up-to-date information from the internet via a Crawler API.Last updated -175215JavaScript
- -securityAlicense-qualityA Model Context Protocol server that provides real-time web search capabilities to AI assistants through pluggable search providers, currently integrated with the Brave Search API.Last updated -11TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to perform web searches using Google Search API, returning up to 20 search results in JSON format.Last updated -2PythonApache 2.0