
cr7258/elasticsearch-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
cr7258/elasticsearch-mcp-server は、https://github.com/cr7258/elasticsearch-mcp-server. からインポートされたMCPサーバー候補です。
概要
cr7258/elasticsearch-mcp-server は、https://github.com/cr7258/elasticsearch-mcp-server. からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
概要
ElasticsearchとOpenSearchの相互作用を提供するモデルコンテキストプロトコル(MCP)サーバー実装です。このサーバーは、一連のツールを通じて文書の検索、インデックスの分析、クラスタ管理を可能にします。
デモ
https://github.com/user-attachments/assets/f7409e31-fac4-4321-9c94-b0ff2ea7ff15
特徴
一般作戦
general_api_request:一般的なHTTP APIリクエストを実行します。専用ツールを持たないElasticsearch/OpenSearch APIに対してこのツールを使用します。
インデックス操作
list_indices:すべてのインデックスを一覧表示。get_index:1つ以上のインデックスに関する情報(マッピング、設定、エイリアス)を返します。create_index:新しいインデックスを作成します。delete_index: インデックスを削除します。create_data_stream:新しいデータストリームを作成する(マッチングインデックステンプレートが必要)。get_data_stream:1つ以上のデータストリームに関する情報を取得する。delete_data_stream:1つ以上のデータストリームとその裏付けインデックスを削除します。
ドキュメント操作
search_documents:文書の検索。index_document:インデックス内の文書を作成または更新します。get_document:IDで書類を取得します。delete_document: IDで文書を削除します。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Elasticsearch/OpenSearch MCP Server
Overview
A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.
Demo
https://github.com/user-attachments/assets/f7409e31-fac4-4321-9c94-b0ff2ea7ff15
Features
General Operations
general_api_request: Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
Index Operations
list_indices: List all indices.get_index: Returns information (mappings, settings, aliases) about one or more indices.create_index: Create a new index.delete_index: Delete an index.create_data_stream: Create a new data stream (requires matching index template).get_data_stream: Get information about one or more data streams.delete_data_stream: Delete one or more data streams and their backing indices.
Document Operations
search_documents: Search for documents.index_document: Creates or updates a document in the index.get_document: Get a document by ID.delete_document: Delete a document by ID.delete_by_query: Deletes documents matching the provided query.
Cluster Operations
get_cluster_health: Returns basic information about the health of the cluster.get_cluster_stats: Returns high-level overview of cluster statistics.
Alias Operations
list_aliases: List all aliases.get_alias: Get alias information for a specific index.put_alias: Create or update an alias for a specific index.delete_alias: Delete an alias for a specific index.
Analyzer Operations
analyze_text: Analyze text using a specified analyzer or custom analysis chain. Useful for debugging search queries and understanding how text is tokenized.
Configure Environment Variables
The MCP server supports the following environment variables:
Basic Authentication (Username/Password)
ELASTICSEARCH_USERNAME: Username for basic authenticationELASTICSEARCH_PASSWORD: Password for basic authenticationOPENSEARCH_USERNAME: Username for OpenSearch basic authenticationOPENSEARCH_PASSWORD: Password for OpenSearch basic authentication
API Key Authentication (Elasticsearch only) - Recommended
インストール
uvx elasticsearch-mcp-server設定
{
"mcpServers": {
"elasticsearch-mcp-server": {
"command": "uvx",
"args": [
"elasticsearch-mcp-server"
],
"env": {
"ELASTICSEARCH_CLUSTERS": "{\"prod\": {\"hosts\": [\"https://prod-es:9200\"], \"api_key\": \"<PROD_API_KEY>\", \"verify_certs\": true}, \"staging\": {\"hosts\": [\"https://staging-es:9200\"], \"username\": \"elastic\", \"password\": \"<STAGING_PASSWORD>\"}}",
"DEFAULT_CLUSTER": "prod"
}
}
}
}