Solr MCP Serverのロゴ

Solr MCP Server

組織
apache

Solr MCP Server

公開者apache
リポジトリsolr-mcp
言語Java
フォーク
17
スター
19
利用可能なツール
0
通信方式stdio, streamable-http
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Solr MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには19件のスターと17件のフォークがあります。

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.

インストール

TypingMind
前提条件:

Node.js 18+

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

Solr MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Solr MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 お使いのデバイス上でMCPをローカル実行することも、リモートMCPサーバーのURLに接続することもできます。

方法1:ローカルコネクタを使用

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Solr MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Solr MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "apache-solr-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "solr-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてSolr MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Solr MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Solr MCP Serverを使ってこのタスクを手伝ってもらえますか?
Solr MCP Server
はい、読みました。
Solr MCP Serverで調べた結果をお伝えします。

方法2:MCPサーバーのURLを追加

Solr MCP Serverがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にお使いのサーバーURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にお使いのサーバーURLを貼り付けてください。
  2. Solr MCP Serverの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. Solr MCP Serverの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でSolr MCP Serverのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でSolr MCP Serverのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Solr MCP Serverを使ってこのタスクを手伝ってもらえますか?
Solr MCP Server
はい、読みました。
Solr MCP Serverで調べた結果をお伝えします。

よくある質問

Solr MCP Server MCPサーバーは何に使いますか?

Solr MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでSolr MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでSolr MCP Serverを利用できます。

TypingMindでSolr MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Solr MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Solr MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Solr MCP Serverは、ローカルMCPコネクタを使うか、リモートMCPサーバーのURLを追加することでTypingMindに接続できます。サーバーがデバイス上のファイル、アプリ、プライベートリソースにアクセスする必要がある場合はローカルコネクタを、MCPサーバーがリモートでホストされている場合はサーバーURLを使用してください。

TypingMindでSolr MCP Server MCPのどのようなツールを利用できますか?

Solr MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Solr MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Solr MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇