インストール不要。2分以内に動きます。
cloud.anythingmcp.com で無料トライアルを開始し、Elasticsearch をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。
AnythingMCP は Claude のコネクタディレクトリに掲載されています。ワンクリックで Claude に追加 (新しいタブで開きます)し、サインインして Claude が使える MCP サーバーを選んでください。
概要
AI に、Elastic Cloud、Serverless、自社サーバー上の Elasticsearch クラスターを探索、照会させます。インデックスとデータストリームの一覧、マッピングの読み取り、検索、集計、件数カウント、ES|QL の実行ができ、確認のうえでドキュメントの書き込みも行います。
こう聞いてみよう
Elasticsearch のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Elasticsearch をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Elasticsearch + Claude
AI に、Elastic Cloud、Serverless、自社サーバー上の Elasticsearch クラスターを探索、照会させます。インデックスとデータストリームの一覧、マッピングの読み取り、検索、集計、件数カウント、ES|QL の実行ができ、確認のうえでドキュメントの書き込みも行います。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
ELASTICSEARCH_URL, ELASTICSEARCH_API_KEY
ステップ 1 — 認証情報を取得
- Elasticsearch のエンドポイントを確認します。Elastic Cloud Hosted:
https://cloud.elastic.coでデプロイメントを開き、Elasticsearch endpoint をコピーします(例:https://my-deployment.es.europe-west3.gcp.cloud.es.io)。Serverless: プロジェクトを開き、Elasticsearch のエンドポイントをコピーします。セルフマネージド: クラスターが応答する HTTPS アドレスとポートです(例:https://search.example.com:9200)。末尾のスラッシュを付けずにELASTICSEARCH_URLに貼り付けます。Kibana のアドレスではなく、Elasticsearch のエンドポイントを使ってください。 - Kibana の Stack Management → API keys → Create API key(Serverless ではプロジェクト設定 → API keys)で API キーを作成します。
anythingmcpなどの名前と有効期限を付け、Control security privileges をオンにして権限を絞ります(下記参照)。 - Encoded の値(base64)をコピーします。Elastic はこの値を 1 回しか表示しません。
ELASTICSEARCH_API_KEYに貼り付けて、コネクタをインストールします。idやapi_keyの値だけでは動作せず、ユーザー名とパスワードによる認証には対応していません。 elasticsearch_whoamiで設定を確認します。権限は不要で、キーの所有者を表示します。
対応するクラスター: Elastic Cloud Hosted、Elastic Cloud Serverless、バージョン 8 以降のセルフマネージドクラスター。AnythingMCP Cloud からはインターネット経由で到達できるクラスターが必要です。セルフホストの AnythingMCP なら、管理者がそのホストを許可すれば社内ネットワークのクラスターにも接続できます。
読み取り専用キー(推奨): Kibana のフォームで次のロール記述子を使うか、Kibana の Dev Tools でリクエストを実行し、応答の encoded をコピーします。
POST /_security/api_key
{
"name": "anythingmcp-read",
"expiration": "365d",
"role_descriptors": {
"anythingmcp_read": {
"cluster": ["monitor"],
"indices": [
{ "names": ["*"], "privileges": ["read", "view_index_metadata", "monitor"] }
]
}
}
}
"*" は、AI に見せてよいインデックスパターン(例: ["products", "logs-*"])に置き換えてください。read は検索、件数、集計、ES|QL、単一ドキュメントを、view_index_metadata はマッピング、エイリアス、データストリームを、monitor はインデックス一覧とクラスターの状態をカバーします。キーが作成したユーザー以上の権限を持つことはありません。
AI ができること: インデックス、エイリアス、データストリームの一覧表示、クエリ前のフィールドマッピングの確認、Query DSL による検索(既定 10 件、1 回あたり最大 100 件)、値ごとの件数、合計、平均、日付ヒストグラムなどの集計、一致件数のカウント、表形式の回答のための ES|QL クエリ(最大 500 行)、単一ドキュメントの読み取り。一般的なベクトルフィールドは検索結果から除外されます。Elastic がクラスターを運用する Serverless では、クラスターの状態は取得できません。
書き込みは先に確認します: elasticsearch_index_document はドキュメント全体を作成または置き換え、elasticsearch_update_document はドキュメントの一部のフィールドを変更します。どちらの場合も、AI はインデックス、_id、内容を示してから、あなたの同意を待ちます。両方とも write 権限が必要なため、上の読み取り専用キーでは 403 で失敗します。これは意図した安全策です。
インストール時はオフ: elasticsearch_delete_document と elasticsearch_delete_by_query。削除は元に戻せず、delete by query は数百万件のドキュメントを消すこともあります。管理者が意図して有効にします。有効にした後も、AI はまず対象ドキュメントの件数を数え、削除の前に確認します。
よくあるエラー: 401: キーが間違っている、期限切れ、無効化されている、または Encoded の値ではなく id が貼り付けられています。403 security_exception: メッセージに書かれた権限がキーにありません。404 index_not_found_exception: インデックス名が存在しません。400 parsing_exception または verification_exception: クエリに誤りがあります。メッセージにフィールドや位置が示されます。429: クラスターが過負荷です。少し待ってから再試行してください。
このコネクタが通信するのは Elasticsearch だけで、Kibana には接続しません。インデックスの作成や削除、マッピングや設定の変更、スナップショット、インジェストパイプライン、セキュリティ管理、Bulk API には対応していません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Claude にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
推奨ルート:設定ファイルを触らずに claude.ai web で動作します。
- Claude で Customize → Connectors を開きます。
- + をクリックし、Add custom connector を選びます。
- 名前(例:
Elasticsearch)とリモート MCP サーバー URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDを入力し、Add をクリックします。 - Connect をクリックし、AnythingMCP にサインイン(OAuth)してアクセスを許可します。
下記のすべてのツールがチャットに表示されます。プロンプトを入力し始めてください。
利用可能なツール
| Tool | What it does |
|---|---|
elasticsearch_whoami | Show who the connector is signed in as: the user behind the API key, the key's name and id and the authentication type |
elasticsearch_cluster_info | Get basic information about the cluster: name, uuid, Elasticsearch version and build flavor (serverless on Elastic Cloud Serverless) |
elasticsearch_cluster_health | Get the cluster health: status (green, yellow or red), node counts, active, relocating, initializing and unassigned shards and pending tasks |
elasticsearch_list_indices | List indices with their health, status, document count, store size, primary and replica shard counts and creation date, sorted by name (at… |
elasticsearch_get_mapping | Get the field mapping of an index or data stream: every field with its type (text, keyword, date, long, dense_vector...) |
elasticsearch_search | Search an index, data stream or alias with the Query DSL and get the matching documents (total, and per hit _index, _id, _score, _source… |
elasticsearch_aggregate | Run aggregations over an index or data stream without returning documents: counts per value (terms), sums and averages, date histograms… |
elasticsearch_count | Count the documents in an index, data stream or alias that match a query (all documents without a query) |
elasticsearch_esql_query | Run an ES|QL query, a piped language for filtering, aggregating and joining (Elasticsearch 8.11 or later, and Serverless) |
elasticsearch_get_document | Get one document by its _id from an index: found, _version and the _source, optionally only some fields |
elasticsearch_list_aliases | List index aliases: alias name, the index it points to, whether it has a filter and whether it is the write index |
elasticsearch_list_data_streams | List data streams (time series such as logs and metrics): name, health status, index template, generation, number of backing indices… |
elasticsearch_index_document | Create or replace a whole document under a given _id in an index |
elasticsearch_update_document | Change some fields of an existing document by _id, leaving the others as they are (a partial update with doc) |
elasticsearch_delete_document | Delete one document by _id |
elasticsearch_delete_by_query | Delete every document that matches a query |
プロンプトの例
- 「どんなインデックスがあり、それぞれのドキュメント数とサイズはどれくらいですか?」
- 「products インデックスで 100 ユーロ未満のワイヤレスヘッドホンを検索し、名前、ブランド、価格を見せてください。」
- 「ES|QL で、logs- の過去 24 時間のエラー数をホストごとに数え、上位 10 件を見せてください。」*
- 「9 月の 1 日あたりの注文数は?orders インデックスで日付ヒストグラムを使ってください。」
- 「products インデックスの商品 4711 の stock フィールドを 0 にしてください。変更する前に内容を見せてください。」
FAQ
Claude Code は Claude Desktop と同じように動作しますか? はい。両方を https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID に向けてください。
次のステップ
このガイドは役に立ちましたか?