apache/solr-mcp
If you are the rightful owner of solr-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Spring AI Model Context Protocol (MCP) server that provides tools for interacting with Apache Solr.
Solr MCP Server
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.
What’s inside
- 🔍 Search Solr collections with filtering, faceting, and pagination
- 📝 Index documents in JSON, CSV, and XML
- 📊 Manage collections and view statistics
- 🔧 Inspect schema
- 🔌 Transports: STDIO (Claude Desktop) and HTTP (MCP Inspector)
- 🐳 Docker images built with Jib
Get started (users)
- Prerequisites: Java 25+, Docker (and Docker Compose), Git
- Start Solr with sample data:
docker compose up -d - Run the server:
- STDIO mode (default):
- JAR:
./gradlew build java -jar build/libs/solr-mcp-0.0.1-SNAPSHOT.jar - Docker:
docker run -i --rm ghcr.io/apache/solr-mcp:latest
- JAR:
- HTTP mode:
- JAR:
PROFILES=http java -jar build/libs/solr-mcp-0.0.1-SNAPSHOT.jar - Docker:
docker run -p 8080:8080 --rm -e PROFILES=http ghcr.io/apache/solr-mcp:latest
- JAR:
- STDIO mode (default):
For more options (custom SOLR_URL, Linux host networking) see the Deployment Guide: docs/DEPLOYMENT.md
Claude Desktop
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
Available MCP tools
| 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 |
Screenshots
-
Claude Desktop (STDIO):

-
MCP Inspector (HTTP):

-
MCP Inspector (STDIO):

Documentation
- Architecture: docs/ARCHITECTURE.md
- Development (build, run, test, add features): docs/DEVELOPMENT.md
- Deployment (Docker, HTTP vs STDIO, CI/CD, MCP Registry): docs/DEPLOYMENT.md
- Troubleshooting: docs/TROUBLESHOOTING.md
Contributing
We welcome contributions!
- Start here: CONTRIBUTING.md
- Developer workflows, coding standards, and tests: docs/DEVELOPMENT.md
Support
- Issues: https://github.com/apache/solr-mcp/issues
- Discussions: https://github.com/apache/solr-mcp/discussions
License
Apache License 2.0 — see LICENSE
Acknowledgments
Built with:
- Spring AI MCP — https://spring.io/projects/spring-ai
- Apache Solr — https://solr.apache.org/
- Jib — https://github.com/GoogleContainerTools/jib
- Testcontainers — https://www.testcontainers.org/