Solr MCP Server logo

Solr MCP Server

Organization
apache

Solr MCP Server

Publisherapache
Repositorysolr-mcp
LanguageJava
Forks
17
Stars
19
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    Solr MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    19 stars and 17 forks from the linked repository.

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

bash
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

bash
./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:

json
{
  "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 Desktop · 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 passed as a JSON array of objects into a collection
index-csv-documentsIndex documents from a CSV string via Solr's CSV handler; repeat a column name for multi-valued fields
index-xml-documentsIndex documents from Solr update XML (<add><doc><field name="...">); only <add> blocks are accepted
index-markdown-documentsIndex a markdown document into a collection, extracting front matter, title, headings, and body text
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-collections—List 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.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "apache-solr-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "solr-mcp"
      ]
    }
  }
}

Use Solr MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Solr MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Solr MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Solr MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "apache-solr-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "solr-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Solr MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Solr MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Solr MCP Server to help me with this task?
Solr MCP Server
Sure. I read it.
Here is what I found using Solr MCP Server.

Option 2: Add an MCP server URL

Use this when Solr MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for Solr MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Solr MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Solr MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Solr MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Solr MCP Server to help me with this task?
Solr MCP Server
Sure. I read it.
Here is what I found using Solr MCP Server.

Frequently asked questions

What is the Solr MCP Server MCP server used for?

Solr MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Solr MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Solr MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Solr MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Solr MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Solr MCP Server MCP to TypingMind?

Solr MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Solr MCP Server MCP provide in TypingMind?

Solr MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Solr MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Solr MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇