A Model Context Protocol server for Elasticsearch and OpenSearch that enables document search, index management, and cluster operations through AI assistants with comprehensive tooling for data interaction.
Perform a general HTTP API request for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
List all indices.
Returns information (mappings, settings, aliases) about one or more indices.
Create a new index.
Delete an index.
Create a new data stream (requires matching index template).
Get information about one or more data streams.
Delete one or more data streams and their backing indices.
Search for documents.
Creates or updates a document in the index.
Get a document by ID.
Delete a document by ID.
Deletes documents matching the provided query.
Returns basic information about the health of the cluster.
Returns high-level overview of cluster statistics.
List all aliases.
Get alias information for a specific index.
Create or update an alias for a specific index.
Delete an alias for a specific index.
{
"mcpServers": {
"elasticsearch-mcp-server": {
"command": "uvx",
"args": [
"elasticsearch-mcp-server"
],
"env": {
"ELASTICSEARCH_HOSTS": "https://localhost:9200",
"ELASTICSEARCH_USERNAME": "elastic",
"ELASTICSEARCH_PASSWORD": "test123"
}
}
}
}