Elasticsearch MCP Server
@elastic
About Elasticsearch MCP Server
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-server-elasticsearch": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"\\"
]
}
}
}Tools
5List all available Elasticsearch indices
Get field mappings for a specific Elasticsearch index
Perform an Elasticsearch search using query DSL
Execute an ES|QL query
Get shard information for all or specific indices
Overview
What is Elasticsearch MCP Server?
The Elasticsearch MCP Server connects AI agents to Elasticsearch data using the Model Context Protocol (MCP), enabling natural language interactions with indices for querying, analysis, and retrieval without custom APIs. This server is deprecated and will only receive critical security updates; it has been superseded by the Elastic Agent Builder MCP endpoint (available in Elastic 9.2.0+ and Elasticsearch Serverless).
How to use Elasticsearch MCP Server?
Deploy the server as a Docker container from AWS Marketplace, then configure it to use either the stdio protocol (direct client communication) or the streamable-HTTP protocol (web-based integrations). Set environment variables (ES_URL, ES_API_KEY or ES_USERNAME/ES_PASSWORD) and run with docker run -i --rm docker.elastic.co/mcp/elasticsearch stdio (or http for HTTP mode).
Key features of Elasticsearch MCP Server
list_indices: List all available Elasticsearch indicesget_mappings: Get field mappings for a specific indexsearch: Execute a query DSL searchesql: Run an ES|QL queryget_shards: Obtain shard information for indices- Supports stdio and streamable-HTTP transports
Use cases of Elasticsearch MCP Server
- Natural language querying of Elasticsearch via AI agents (e.g., Claude Desktop, Cursor, VS Code)
- Automated data retrieval and analysis without creating custom APIs
- Integrating Elasticsearch data into AI-powered workflows and chatbots
- Building search and analytics applications with natural language interfaces
FAQ from Elasticsearch MCP Server
Is the Elasticsearch MCP Server still supported?
This server is deprecated and will only receive critical security updates. It has been superseded by the Elastic Agent Builder MCP endpoint, available in Elastic 9.2.0+ and Elasticsearch Serverless.
How do I authenticate to Elasticsearch?
Set either ES_API_KEY (API key) or both ES_USERNAME and ES_PASSWORD (basic authentication) as environment variables when running the container.
What protocols does the server support?
The server supports stdio (for direct client connections) and streamable-HTTP (for web-based integrations). Server-Sent Events (SSE) is deprecated—use streamable-HTTP instead.
What are the prerequisites to run the server?
You need an Elasticsearch cluster (8.x or 9.x), Docker installed, an MCP client, and network connectivity between the container and your Elasticsearch cluster. Authentication credentials (API key or username/password) are required.
Where does my data reside?
All data remains in your Elasticsearch cluster; the container does not store data locally. The server communicates with Elasticsearch over HTTPS when using an https:// URL.
Frequently asked questions
Is the Elasticsearch MCP Server still supported?
This server is **deprecated** and will only receive critical security updates. It has been superseded by the [Elastic Agent Builder](https://ela.st/agent-builder-docs) MCP endpoint, available in Elastic 9.2.0+ and Elasticsearch Serverless.
How do I authenticate to Elasticsearch?
Set either `ES_API_KEY` (API key) or both `ES_USERNAME` and `ES_PASSWORD` (basic authentication) as environment variables when running the container.
What protocols does the server support?
The server supports stdio (for direct client connections) and streamable-HTTP (for web-based integrations). Server-Sent Events (SSE) is deprecated—use streamable-HTTP instead.
What are the prerequisites to run the server?
You need an Elasticsearch cluster (8.x or 9.x), Docker installed, an MCP client, and network connectivity between the container and your Elasticsearch cluster. Authentication credentials (API key or username/password) are required.
Where does my data reside?
All data remains in your Elasticsearch cluster; the container does not store data locally. The server communicates with Elasticsearch over HTTPS when using an `https://` URL.
Basic information
More Databases MCP servers
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.

Redis
modelcontextprotocolModel Context Protocol Servers
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Comments