Back to MCP Directory
Elasticsearch
Model Context Protocol moderate risk

Elasticsearch

This MCP server provides tools to interact with Elasticsearch/OpenSearch, enabling document searching, index management, and cluster administration with configurable security.

Connections & Capabilities

Connects To

GitHubDocker

Capabilities

readwriteadmin

Quickstart

Install

uvx elasticsearch-mcp-server-es7

Exposed MCP Tools (20)

high
general_api_request

Performs a general HTTP API request to Elasticsearch/OpenSearch.

Allows execution of arbitrary API calls, potentially leading to data breaches or system compromise.

safe
list_indices

Lists all indices in the Elasticsearch/OpenSearch cluster.

Read-only operation that does not modify any data.

safe
get_index

Retrieves information about one or more indices.

Read-only operation that retrieves index metadata.

moderate
create_index

Creates a new index in Elasticsearch/OpenSearch.

Creates a new index, which could impact cluster performance or storage.

critical
delete_index

Deletes an index from Elasticsearch/OpenSearch.

Deletes an index and all its data, resulting in permanent data loss.

safe
search_documents

Searches for documents within Elasticsearch/OpenSearch.

Read-only operation that retrieves documents based on a query.

moderate
index_document

Creates or updates a document in the index.

Modifies data within an index, potentially overwriting existing documents.

safe
get_document

Retrieves a document by its ID.

Read-only operation that retrieves a specific document.

critical
delete_document

Deletes a document by its ID.

Deletes a specific document, resulting in data loss.

critical
delete_by_query

Deletes documents matching the provided query.

Deletes documents based on a query, potentially resulting in significant data loss.

safe
get_cluster_health

Returns basic information about the health of the cluster.

Read-only operation that retrieves cluster health status.

safe
get_cluster_stats

Returns a high-level overview of cluster statistics.

Read-only operation that retrieves cluster statistics.

safe
list_aliases

Lists all aliases in the Elasticsearch/OpenSearch cluster.

Read-only operation that does not modify any data.

safe
get_alias

Get alias information for a specific index.

Read-only operation that retrieves alias metadata.

moderate
put_alias

Create or update an alias for a specific index.

Creates or updates an alias, which could impact query routing.

critical
delete_alias

Delete an alias for a specific index.

Deletes an alias, potentially breaking existing queries.

safe
analyze_text

Analyze text using a specified analyzer or custom analysis chain.

Read-only operation that analyzes text without modifying data.

moderate
create_data_stream

Create a new data stream (requires matching index template).

Creates a new data stream, which could impact cluster performance or storage.

safe
get_data_stream

Get information about one or more data streams.

Read-only operation that retrieves data stream metadata.

critical
delete_data_stream

Delete one or more data streams and their backing indices.

Deletes one or more data streams and their backing indices, resulting in permanent data loss.

Safety Assessment

This server's safety depends heavily on configuration. Disabling high-risk operations and setting a strong MCP_API_KEY are crucial for secure deployments. The general API request tool should be used with caution due to its potential for arbitrary actions.

  • Supports API key authentication for Elasticsearch.
  • Offers option to disable high-risk operations (write/delete).
  • Allows disabling specific operations via configuration.
  • Provides basic authentication via username/password.
  • If MCP_API_KEY is not set for HTTP transports, no authentication is required.
  • General API request tool can potentially execute arbitrary commands.
  • Write operations are enabled by default.
  • Secrets (passwords, API keys) are managed via environment variables.