A Spring AI Model Context Protocol (MCP) server that provides tools for interacting with Apache Solr. Enables AI assistants like Claude to search, index, and manage Solr collections through the MCP protocol.
docker compose up -d
./gradlew build java -jar build/libs/solr-mcp-0.0.1-SNAPSHOT.jar
docker run -i --rm ghcr.io/apache/solr-mcp:latest
PROFILES=http java -jar build/libs/solr-mcp-0.0.1-SNAPSHOT.jar
docker run -p 8080:8080 --rm -e PROFILES=http ghcr.io/apache/solr-mcp:latest
For more options (custom SOLR_URL, Linux host networking) see the Deployment Guide: docs/DEPLOYMENT.md
Add this to your Claude Desktop config (macOS path shown); then restart Claude.
STDIO mode (default)
Using Docker:
{ "mcpServers": { "solr-mcp": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/apache/solr-mcp:latest"], "env": { "SOLR_URL": "http://localhost:8983/solr/" } } } }
Using JAR:
{ "mcpServers": { "solr-mcp": { "command": "java", "args": [ "-jar", "/absolute/path/to/solr-mcp-0.0.1-SNAPSHOT.jar" ], "env": { "SOLR_URL": "http://localhost:8983/solr/" } } } }
HTTP mode
Using Docker:
{ "mcpServers": { "solr-mcp": { "command": "docker", "args": [ "run", "-p", "8080:8080", "--rm", "ghcr.io/apache/solr-mcp:latest" ], "env": { "PROFILES": "http", "SOLR_URL": "http://localhost:8983/solr/" } } } }
Using JAR:
{ "mcpServers": { "solr-mcp": { "command": "java", "args": [ "-jar", "/absolute/path/to/solr-mcp-0.0.1-SNAPSHOT.jar" ], "env": { "PROFILES": "http", "SOLR_URL": "http://localhost:8983/solr/" } } } }
More configuration options: docs/DEPLOYMENT.md#docker-images-with-jib
| Tool | Description |
|---|---|
search | Search Solr collections with advanced query options |
index_documents | Index documents from JSON, CSV, or XML |
listCollections | List all available Solr collections |
getCollectionStats | Get statistics and metrics for a collection |
checkHealth | Check the health status of a collection |
getSchema | Retrieve schema information for a collection |
Claude Desktop (STDIO):
MCP Inspector (HTTP):
MCP Inspector (STDIO):
We welcome contributions!
Apache License 2.0 — see LICENSE
Built with: