Elasticsearch

Elasticsearch

MCP server implementation that provides Elasticsearch interaction.

225
Stars
48
Forks
19
Releases

Overview

Elasticsearch/OpenSearch MCP Server is an MCP server implementation that enables interaction with Elasticsearch/OpenSearch clusters. It exposes a comprehensive set of MCP tools to search documents, analyze indices, manage aliases, and monitor cluster health. Core capabilities include general_api_request, index operations (list_indices, get_index, create_index, delete_index, create_data_stream, get_data_stream, delete_data_stream), document operations (search_documents, index_document, get_document, delete_document, delete_by_query), cluster operations (get_cluster_health, get_cluster_stats), and alias operations (list_aliases, get_alias, put_alias, delete_alias). The server supports configuring credentials and connections via environment variables, including basic authentication (ELASTICSEARCH_USERNAME/PASSWORD, OPENSEARCH_USERNAME/PASSWORD), API key authentication (ELASTICSEARCH_API_KEY), host lists (ELASTICSEARCH_HOSTS/OPENSEARCH_HOSTS), and certificate verification (ELASTICSEARCH_VERIFY_CERTS/OPENSEARCH_VERIFY_CERTS). High-risk write operations can be disabled globally (DISABLE_HIGH_RISK_OPERATIONS) or selectively via DISABLE_OPERATIONS. It is compatible with Elasticsearch 7.x, 8.x, 9.x and OpenSearch 1.x–3.x, with variants for es7/es9/opensearch and a default es8 client. The README also covers docker-compose startup, default credentials, and how to run via uvx/uv/stdio.

Details

Owner
cr7258
Language
Python
License
Apache License 2.0
Updated
2025-12-07

Features

general_api_request

Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.

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.

search_documents

Search for documents.

index_document

Creates or updates a document in the index.

get_cluster_health

Returns basic information about the health of the cluster.