Provides MCP-based access to Solr actions: search, index, manage collections, and schema retrieval.
Configuration
View docs{
"mcpServers": {
"adityamparikh-solr-mcp-server": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/solr-mcp-server/build/libs/solr-mcp-server-0.0.1-SNAPSHOT.jar"
],
"env": {
"PROFILES": "stdio",
"SOLR_URL": "http://localhost:8983/solr/"
}
}
}
}You can use this MCP server to interact with Apache Solr through the MCP protocol. It lets you search, index, manage, and inspect Solr collections from AI assistants or MCP clients, enabling streamlined data access and governance inside your Solr deployments.
Connect your MCP client (for example Claude Desktop) to the Solr MCP Server using the STDIO transport. Run the server locally, then use its tools to search collections, index documents, manage collections, and retrieve schema information. You will interact with a stable set of MCP tools that map to common Solr operations.
Prerequisites you need before starting:
Step-by-step setup:
# 1. Clone the repository
git clone https://github.com/yourusername/solr-mcp-server.git
cd solr-mcp-server
# 2. Start Solr using Docker Compose
docker-compose up -d
# 3. Build the project
./gradlew build
# Build without tests (faster)
./gradlew assemble
# Clean and rebuild
./gradlew clean buildSTDIO transport is the recommended option for local deployments because all communication happens within the same machine and avoids network exposure. This keeps credentials from traversing a network. If you explore HTTP mode for remote access, you must implement proper security controls to protect endpoints and data.
If you run into issues, verify Solr is accessible at its default URL or any URL you configure via the SOLR_URL environment variable. Check the server logs for error messages, confirm the Solr collections exist, and ensure the STDIO command points to the correct executable JAR. For STDIO mode with Claude Desktop, ensure the JAR path is absolute and correctly referenced in your client configuration.
The server exposes a defined set of MCP tools for Solr operations, including searching, indexing, listing collections, getting collection stats, checking health, and retrieving schemas. These tools map to common Solr actions and are designed to be invoked from MCP clients in a pluggable, language-agnostic manner.
Query a Solr collection with optional filters, facets, sorting, and pagination.
Index documents into a Solr collection from JSON, CSV, or XML formats.
List all available Solr collections.
Retrieve detailed statistics and metrics for a Solr collection.
Check the health status of a Solr collection.
Retrieve the schema information for a Solr collection.