AS

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

21 stars 17 forks 品質 81 トレンド 30Apache-2.0

Solr MCP Server

概要

Search, index, and manage Apache Solr collections using — no need to hand-craft Solr queries, build filter expressions, or memorize the admin API. "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, Codex, ChatGPT, VS Code/Copilot, Cursor, JetBrains, Zed) can invoke. Java 25+, Docker and Docker Compose, Git. works with Apache Solr (the test suite runs against 9.9 by default — see Solr version compatibility). This starts Solr in SolrCloud mode with two sample collections: (1,100+ movies) and (empty, ready for indexing). Wait ~30 seconds, then verify at http://localhost:8983/solr/. This produces build/libs/solr-mcp-1.0.0-SNAPSHOT.jar. Add the server to your MCP client. For , edit ~/Library/Application Support/Claude/claude_desktop_config.

README

以下は原文 README の抜粋です。原文を見る。

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, Codex, ChatGPT, VS Code/Copilot, Cursor, JetBrains, Zed) can invoke.

Quick start

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

Compatibility: works with Apache Solr 9.4–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 .

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 Desktop · Claude Code · Codex · ChatGPT (HTTP only) · VS Code / Copilot · Cursor · JetBrains · Zed · 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

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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/" } } } }