About
Overview
The Elasticsearch MCP Server enables AI agents to interact with Elasticsearch for full-text search, data analytics, and log analysis. It provides tools for searching documents, managing indexes, running aggregations, and monitoring cluster health. Supports both Elasticsearch and OpenSearch.
Capabilities
Tools & Capabilities
⚡search
Search for documents using query DSL or simple query strings
⚡index_document
Index a document into a specified index
⚡get_document
Retrieve a document by its ID
⚡list_indices
List all indices in the cluster
⚡get_mapping
Get the field mapping for an index
⚡cluster_health
Get the health status of the Elasticsearch cluster
Setup
Installation
bash
Install
npx -y @elastic/mcp-server-elasticsearchExamples
Example Usage
javascript
Usage
{
"mcpServers": {
"elasticsearch": {
"command": "npx",
"args": ["-y", "@elastic/mcp-server-elasticsearch"],
"env": {
"ELASTICSEARCH_URL": "http://localhost:9200"
}
}
}
}Quick Info
Authorelastic
LanguageTypeScript
StatusStable
Stars★ 260
Last UpdatedFeb 12, 2026