elasticsearch-mcp MCP Server

A Model Context Protocol (MCP) server for Elasticsearch operations, providing a comprehensive set of tools for interacting with Elasticsearch clusters through the standardized Model Context…

Local serverstdioMIT

What is the elasticsearch-mcp Server?

elasticsearch-mcp is an MCP project maintained in the octodet/elasticsearch-mcp repository. The maintainer describes its purpose as “A Model Context Protocol (MCP) server for Elasticsearch operations, providing a comprehensive set of tools for interacting with Elasticsearch clusters through the standardized Model Context…”. Read the project documentation for the complete scope.

Installation

The documented npm package is @octodet/elasticsearch-mcp. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Configuration values

The example declares ES_URL, ES_API_KEY, ES_VERSION. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
indexPatternoptional, string): Pattern to filter indices (e.g., "logs-_", "my-index-_")
indexrequired, string): The index to count documents in
queryBodyrequired, object): The Elasticsearch query DSL body
highlightoptional, boolean): Enable search result highlighting (default: true)
documentconditional, object): Document content (required for index/create/update operations)
idoptional, string): Document ID (required for update/delete, optional for index/create)
queryoptional, object): Elasticsearch query to filter documents for counting
scriptrequired, object): Script to execute for updating matched documents
conflictsoptional, string): How to handle version conflicts ("abort" or "proceed", default: "abort")
refreshoptional, boolean): Whether to refresh the index after the operation (default: false)
operationsrequired, array): Array of operation objects, each containing:
actionrequired, string): The operation type ("index", "create", "update", or "delete")
settingsoptional, object): Index settings like number of shards, replicas, etc.
mappingsoptional, object): Field mappings defining how documents should be indexed

How to install the elasticsearch-mcp Server

{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@octodet/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "http://localhost:9200",
        "ES_API_KEY": "YOUR_ES_API_KEY",
        "ES_VERSION": "8"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
ES_URLDeclared in the maintainer’s client configuration.Check documentation
ES_API_KEYDeclared in the maintainer’s client configuration.Check documentation
ES_VERSIONDeclared in the maintainer’s client configuration.Check documentation