
Elasticsearch Mcp Server
The Elasticsearch/OpenSearch MCP server provides tools for interacting with Elasticsearch and OpenSearch clusters, enabling document search, index management, cluster monitoring, and alias operations through a standardized interface. It offers capabilities including searching and managing documents, creating and deleting indices, analyzing text tokenization, viewing cluster health and statistics, and performing general API requests for operations without dedicated tools. The server supports basic authentication and solves the problem of integrating Elasticsearch/OpenSearch functionality into AI applications that use the Model Context Protocol.
- GitHub stars
- 289
- tools
- 20
- auth
- Secret needed
- transport
- STDIO
- env vars
- 5
- last updated
- Sep 15, 2025
Tools
20 toolsPublic tool metadata for what this MCP can expose to an agent.
general_api_requestPerform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
No parameter schema in public metadata yet.
list_indicesList all indices.
List all indices.
No parameter schema in public metadata yet.
get_indexReturns information (mappings, settings, aliases) about one or more indices.
Returns information (mappings, settings, aliases) about one or more indices.
No parameter schema in public metadata yet.
create_indexCreate a new index.
Create a new index.
No parameter schema in public metadata yet.
delete_indexDelete an index.
Delete an index.
No parameter schema in public metadata yet.
create_data_streamCreate a new data stream (requires matching index template).
Create a new data stream (requires matching index template).
No parameter schema in public metadata yet.
get_data_streamGet information about one or more data streams.
Get information about one or more data streams.
No parameter schema in public metadata yet.
delete_data_streamDelete one or more data streams and their backing indices.
Delete one or more data streams and their backing indices.
No parameter schema in public metadata yet.
search_documentsSearch for documents.
Search for documents.
No parameter schema in public metadata yet.
index_documentCreates or updates a document in the index.
Creates or updates a document in the index.
No parameter schema in public metadata yet.
get_documentGet a document by ID.
Get a document by ID.
No parameter schema in public metadata yet.
delete_documentDelete a document by ID.
Delete a document by ID.
No parameter schema in public metadata yet.
delete_by_queryDeletes documents matching the provided query.
Deletes documents matching the provided query.
No parameter schema in public metadata yet.
get_cluster_healthReturns basic information about the health of the cluster.
Returns basic information about the health of the cluster.
No parameter schema in public metadata yet.
get_cluster_statsReturns high-level overview of cluster statistics.
Returns high-level overview of cluster statistics.
No parameter schema in public metadata yet.
list_aliasesList all aliases.
List all aliases.
No parameter schema in public metadata yet.
get_aliasGet alias information for a specific index.
Get alias information for a specific index.
No parameter schema in public metadata yet.
put_aliasCreate or update an alias for a specific index.
Create or update an alias for a specific index.
No parameter schema in public metadata yet.
delete_aliasDelete an alias for a specific index.
Delete an alias for a specific index.
No parameter schema in public metadata yet.
analyze_textAnalyze text using a specified analyzer or custom analysis chain. Useful for debugging search queries and understanding how text is tokenized.
Analyze text using a specified analyzer or custom analysis chain. Useful for debugging search queries and understanding how text is tokenized.
No parameter schema in public metadata yet.
Sponsors
Configuration
ELASTICSEARCH_HOSTSdefault: https://localhost:9200Comma-separated list of Elasticsearch hosts (e.g., https://localhost:9200)
ELASTICSEARCH_API_KEYsecretAPI key for Elasticsearch or Elastic Cloud authentication (recommended)
ELASTICSEARCH_USERNAMEUsername for basic authentication (alternative to API key)
ELASTICSEARCH_PASSWORDsecretPassword for basic authentication (used with ELASTICSEARCH_USERNAME)
ELASTICSEARCH_VERIFY_CERTSdefault: falseWhether to verify SSL certificates (true/false)
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
Details
- Repository
- github.com/cr7258/elasticsearch-mcp-server
- Category
- Databases
- Package
elasticsearch-mcp-server- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
