# Elasticsearch/OpenSearch MCP Server

An MCP server that gives an AI assistant tools to search documents, manage indices, aliases and data streams, and inspect cluster health in Elasticsearch or OpenSearch.

This is a Model Context Protocol server for Elasticsearch and OpenSearch, exposing a set of tools for searching documents, analyzing indices and managing a cluster.

It covers index operations such as listing, creating and deleting indices and data streams; document operations including search, index, get, delete and delete-by-query; cluster health and statistics; alias creation, lookup and deletion; and a text analyzer tool for debugging how a query is tokenized. A general API request tool covers any Elasticsearch or OpenSearch endpoint without a dedicated tool.

It is configured through environment variables, supporting basic username and password authentication for either Elasticsearch or OpenSearch, or API key authentication for Elasticsearch.

Website: https://github.com/cr7258/elasticsearch-mcp-server
