Elasticsearch

Elasticsearch

v0.3.1
Apache-2.0
searchelasticsearchlogsobservability

Summary

Elastic's official MCP server — explore indexes, inspect mappings, and query Elasticsearch conversationally.

Features

  • Query indexes in natural language via the Elasticsearch DSL
  • List indexes and inspect field mappings
  • Read-only by design for safe exploration

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "Elasticsearch" tools will be available.
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@elastic/mcp-server-elasticsearch"
      ],
      "env": {
        "ES_URL": "https://localhost:9200",
        "ES_API_KEY": "your-api-key"
      }
    }
  }
}

Description

Elastic's official MCP server connects an assistant to an Elasticsearch cluster, which is particularly valuable because the Query DSL is powerful and nobody remembers its syntax.

What it provides

  • Index discovery. List indexes and data streams so the assistant knows what exists.
  • Mapping inspection. Field names and types, which is what turns a vague question into a correct query.
  • Search execution using the full Query DSL, generated from a natural-language description.
  • Shard and cluster information for diagnosing health issues.

Where it is most useful

Log and observability data. Asking "show me errors from the payments service in the last hour grouped by status code" and getting an actual aggregation back is meaningfully faster than assembling the query by hand, and the assistant can iterate when the first attempt returns nothing.

Access

Read-only by design, authenticated with an API key scoped to the indexes you want reachable. Works against self-managed clusters, Elastic Cloud, and serverless projects. Runs via npx @elastic/mcp-server-elasticsearch.

Related MCP Servers

Browse all MCP servers →