docs: correct stale SolrJ 10 dependency note (#167)

The docs state that SolrJ 10.x is not on Maven Central (as of 2026-03-06) and
that tests run a SolrJ 9.x client against a Solr 10 server. Both claims were
made obsolete by #58 on 2026-03-24, which bumped solr-solrj to 10.0.0 —
`gradle/libs.versions.toml` has pinned `solr = "10.0.0"` ever since, resolved
from the build's only repository, mavenCentral().

The version skew is also the reverse of what was written: `solr.test.image`
defaults to `solr:9.9-slim`, so the standard build exercises a SolrJ 10 client
against a Solr 9.9 server, not the other way round.

The instruction to "update solr-solrj and Jetty BOM when 10.x is released" is
likewise moot — solr-solrj is already updated, and the Jetty artifacts are
declared versionless and managed by Spring Boot's BOM, so there is no separate
Jetty pin.

Corrects the claim in both places it appears (AGENTS.md, which CLAUDE.md
symlinks to, and dev-docs/DEVELOPMENT.md).

Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 files changed
tree: 94f3f60727ad7ef112315d3b1e85133bf4239d98
  1. .github/
  2. .run/
  3. buildSrc/
  4. config/
  5. dev-docs/
  6. docs/
  7. gradle/
  8. images/
  9. mydata/
  10. scripts/
  11. src/
  12. .asf.yaml
  13. .editorconfig
  14. .env.example
  15. .gitattributes
  16. .gitignore
  17. AGENTS.md
  18. build.gradle.kts
  19. compose.yaml
  20. CONTRIBUTING.md
  21. gradlew
  22. gradlew.bat
  23. init-solr.sh
  24. LICENSE
  25. NOTICE
  26. README.md
  27. server.json
  28. settings.gradle.kts
README.md

Project Status: Incubating

Solr MCP Server

Search, index, and manage Apache Solr collections using natural language — no need to hand-craft Solr queries, build filter expressions, or memorize the admin API.

Instead of writing:

q=title:"star wars" AND genre_s:"sci-fi"&fq=year_i:[2000 TO *]&facet=true&facet.field=genre_s&sort=score desc&rows=10

Just ask your AI assistant:

“Find sci-fi movies with ‘star wars’ in the title released after 2000, show me the genre breakdown, and sort by relevance.”

This Spring AI Model Context Protocol (MCP) server exposes Solr operations as tools that any MCP-compatible AI client (Claude Desktop, Claude Code, VS Code/Copilot, Cursor, JetBrains) can invoke.

Quick start

Prerequisites: Java 25+, Docker and Docker Compose, Git.

Compatibility: works with Apache Solr 8.11–10 (the test suite runs against 9.9 by default — see Solr version compatibility).

1. Start Solr with sample data

git clone https://github.com/apache/solr-mcp.git
cd solr-mcp
docker compose up -d

This starts Solr in SolrCloud mode with two sample collections: films (1,100+ movies) and books (empty, ready for indexing). Wait ~30 seconds, then verify at http://localhost:8983/solr/.

2. Build the server

./gradlew build

This produces build/libs/solr-mcp-1.0.0-SNAPSHOT.jar.

3. Connect your AI client

Add the server to your MCP client. For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude:

{
  "mcpServers": {
    "solr-mcp": {
      "command": "java",
      "args": ["-jar", "/absolute/path/to/solr-mcp/build/libs/solr-mcp-1.0.0-SNAPSHOT.jar"],
      "env": { "SOLR_URL": "http://localhost:8983/solr/" }
    }
  }
}

Using a different client, or want STDIO/HTTP/Docker options? See the per-client guides: Claude Code · VS Code / Copilot · Cursor · JetBrains · MCP Inspector.

4. Try it out

  • “What collections are available in Solr?”
  • “Search the films collection for movies directed by Steven Spielberg”
  • “Show me the schema for the films collection”
  • “Index this JSON into the books collection: [{“id”: “1”, “title”: “The Great Gatsby”, “author”: “F. Scott Fitzgerald”}]”

Example prompts

Searching

  • “Find sci-fi movies released after 2000 and show the genre breakdown”
  • “Search films for movies with ‘war’ in the title, sorted by year”
  • “Show me the top 5 most recent films”

Indexing

  • “Index this JSON into the books collection: [{“id”: “1”, “title”: “1984”, “author”: “George Orwell”}]”
  • “Create a new collection called products”

Managing

  • “Is the films collection healthy?”
  • “How many documents are in the films collection?”
  • “Show me the schema for the films collection”

What you can do

Tools

ToolDescription
searchFull-text search with filtering, faceting, sorting, and pagination
index-json-documentsIndex documents from a JSON string into a collection
index-csv-documentsIndex documents from a CSV string into a collection
index-xml-documentsIndex documents from an XML string into a collection
create-collectionCreate a collection (configSet, numShards, replicationFactor optional — default _default, 1, 1)
list-collectionsList all available Solr collections
get-collection-statsGet statistics and metrics for a collection
check-healthCheck the health status of a collection
add-fieldsAdd fields to a collection schema (additive only; existing fields cannot be modified)
add-field-typesAdd field types — custom analyzers, DenseVectorField for semantic search, etc.
get-schemaRetrieve schema information for a collection

Every tool advertises MCP behavior hints (readOnlyHint, destructiveHint, idempotentHint) so clients can build sensible approval UX — search and the metadata tools are read-only, indexing is destructive but idempotent, schema modification is additive.

Resources

Resource URIDescription
solr://collectionsList of all Solr collections in the cluster
solr://{collection}/schemaSchema definition for a collection (supports autocompletion)

Prompts

Slash-command-style workflow templates that walk the assistant through a canonical Solr workflow.

PromptArgumentsPurpose
explore-collectionsList collections and characterise each by stats and health
setup-collectionname, purpose (optional)Pick configset / shards / replication factor, create the collection, verify it
view-schemacollectionRead-only schema walkthrough
design-schemacollection, datasetDescription, sampleDocument (optional)Choose field types and apply additive schema changes
index-datacollection, format (json / csv / xml), sample (optional)Pick the right indexing tool and confirm the result
search-collectioncollection, questionTranslate a natural-language question into a Solr query

Completions

The server implements MCP argument autocompletion, so clients can suggest valid values as you type:

  • Resource argument — the {collection} segment of solr://{collection}/schema completes to live collection names.
  • Prompt arguments — the collection argument of the search-collection, index-data, view-schema, and design-schema prompts completes to live collection names.

Suggestions are matched case-insensitively by prefix and capped per request.

Configuration

The server reads configuration from environment variables. The essentials:

VariableDescriptionDefault
SOLR_URLSolr base URLhttp://localhost:8983/solr/
PROFILESTransport mode: stdio (default, for Claude Desktop) or http (remote / multi-client)stdio

Running in HTTP mode — OAuth2, CORS, and the HTTP_SECURITY_ENABLED toggle (secured by default) — is covered in the security docs. Tracing and metrics env vars (OTEL_SAMPLING_PROBABILITY, OTEL_TRACES_URL) are covered in Observability.

Documentation

Using it

Developing it

Container images: published images are not yet available on a public registry. The Docker examples in the client guides use a locally built image — build it with ./gradlew jibDockerBuild (produces solr-mcp:latest). See Building Docker images.

Community

License

Apache License 2.0 — see LICENSE.

Acknowledgments

Built with Spring AI MCP, Apache Solr, Jib, Paketo Buildpacks, Testcontainers, and Spring AI MCP Security.