Elasticsearch MCP Server

Enables interaction with Elasticsearch clusters using natural language commands through a Model Context Protocol (MCP) server.

Local serverstdio★ 301

What is the Elasticsearch MCP Server?

Enables interaction with Elasticsearch clusters using natural language commands through a Model Context Protocol (MCP) server.

What it actually does

A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Elasticsearch MCP Server

{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "uvx",
      "args": [
        "elasticsearch-mcp-server"
      ],
      "env": {
        "ELASTICSEARCH_CLUSTERS": "{\"prod\": {\"hosts\": [\"https://prod-es:9200\"], \"api_key\": \"<PROD_API_KEY>\", \"verify_certs\": true}, \"staging\": {\"hosts\": [\"https://staging-es:9200\"], \"username\": \"elastic\", \"password\": \"<STAGING_PASSWORD>\"}}",
        "DEFAULT_CLUSTER": "prod"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
ELASTICSEARCH_CLUSTERSConfiguration value read at startup.Optional
DEFAULT_CLUSTERConfiguration value read at startup.Optional
ELASTICSEARCH_CLUSTERS_FILEConfiguration value read at startup.Optional
ELASTICSEARCH_HOSTSEndpoint or connection string the server talks to.Optional
ELASTICSEARCH_USERNAMEConfiguration value read at startup.Optional
ELASTICSEARCH_PASSWORDConfiguration value read at startup.Optional
ELASTICSEARCH_API_KEYCredential the server authenticates with.Yes
OPENSEARCH_HOSTSEndpoint or connection string the server talks to.Optional

Example prompts to try

  • “Use Elasticsearch to ELASTICSEARCH API KEY.”

Frequently asked questions

The server enables you to list indices, retrieve mapping and settings, search documents using Elasticsearch Query DSL, and get the health status and statistics of your cluster.