Elasticsearch MCP Server connects agents to Elasticsearch data using the Model Context Protocol, enabling natural language interactions with Elasticsearch indices through tools like search, ESQL queries, and index management.
List all available Elasticsearch indices.
Get field mappings for a specific Elasticsearch index.
Perform an Elasticsearch search with the provided query DSL.
Perform an ES|QL query.
Get shard information for all or specific indices.
{
"mcpServers": {
"elasticsearch-mcp-server": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ES_URL", "-e", "ES_API_KEY",
"docker.elastic.co/mcp/elasticsearch",
"stdio"
],
"env": {
"ES_URL": "<elasticsearch-cluster-url>",
"ES_API_KEY": "<elasticsearch-API-key>"
}
}
}
}