Skip to main content
mcpSource-backedReview first Safety Privacy

Elasticsearch MCP Server for Claude

Connect Claude to your Elasticsearch cluster — search indices, inspect mappings, run ES|QL, and check shard health — with Elastic's official Model Context Protocol server.

HarnessClaude CodeCodexCursorClaude Desktop
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • Search, ES|QL, and shard tools run live read queries against the configured cluster; a broad or expensive query can add load.
  • Scope the Elasticsearch API key to least privilege (read-only on the indices Claude should see) before connecting.

Privacy notes

  • Index data, field mappings, and query results enter the MCP client context and the model's prompt.
  • ES_URL and ES_API_KEY are secrets — store them in the client config or environment, never in shared repositories.

Prerequisites

  • Docker installed (the server is distributed as the docker.elastic.co/mcp/elasticsearch image).
  • An Elasticsearch cluster URL (ES_URL) you can reach.
  • An Elasticsearch API key (ES_API_KEY) or username/password (ES_USERNAME + ES_PASSWORD).
  • An MCP client such as Claude Code or Claude Desktop.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
10 minutes
Difficulty
intermediate
Tool listing metadata
Full copyable content
{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "ES_URL", "-e", "ES_API_KEY",
        "docker.elastic.co/mcp/elasticsearch", "stdio"
      ],
      "env": {
        "ES_URL": "<elasticsearch-cluster-url>",
        "ES_API_KEY": "<elasticsearch-api-key>"
      }
    }
  }
}

About this resource

Overview

The Elasticsearch MCP Server is Elastic's official Model Context Protocol server. It connects Claude (and other MCP clients) directly to an Elasticsearch cluster, so you can search indices, inspect mappings, run ES|QL, and check shard health in natural language — without writing a custom API layer. It is distributed as the docker.elastic.co/mcp/elasticsearch container image and licensed under Apache-2.0.

Key capabilities

The server exposes five tools, each mapping to a real Elasticsearch operation:

  • list_indices — list the indices available on the cluster.
  • get_mappings — return the field mappings for a specific index.
  • search — run a search using Elasticsearch Query DSL.
  • esql — run an ES|QL query for tabular, pipe-style analytics.
  • get_shards — report shard allocation and health.

How it compares

Several data-store MCP servers let Claude query a backing store; they differ by data model and query language:

MCP server Data model Query interface Transports
Elasticsearch MCP Search & analytics indices Query DSL + ES|QL stdio, streamable-HTTP
PostgreSQL MCP Relational tables SQL stdio
MongoDB MCP Document collections MongoDB query / aggregation stdio

Choose the Elasticsearch server when your data lives in Elasticsearch and you want full-text search, relevance ranking, or ES|QL analytics; the PostgreSQL and MongoDB servers cover their own relational and document workloads.

Installation

Claude Code

claude mcp add elasticsearch -- docker run -i --rm \
  -e ES_URL=<your-cluster-url> \
  -e ES_API_KEY=<your-api-key> \
  docker.elastic.co/mcp/elasticsearch stdio

Claude Desktop

Add the server to your configuration file:

{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "ES_URL", "-e", "ES_API_KEY",
        "docker.elastic.co/mcp/elasticsearch", "stdio"
      ],
      "env": {
        "ES_URL": "<elasticsearch-cluster-url>",
        "ES_API_KEY": "<elasticsearch-api-key>"
      }
    }
  }
}

To run it as a remote, streamable-HTTP endpoint instead of stdio, start the image with the http argument and publish port 8080:

docker run --rm -e ES_URL -e ES_API_KEY -p 8080:8080 docker.elastic.co/mcp/elasticsearch http

Configuration

Variable Required Purpose
ES_URL Yes Elasticsearch cluster URL.
ES_API_KEY One of API-key authentication.
ES_USERNAME + ES_PASSWORD One of Basic authentication (alternative to the API key).
ES_SSL_SKIP_VERIFY No Skip TLS verification — development only.

Requirements

  • Docker, to pull and run the docker.elastic.co/mcp/elasticsearch image.
  • A reachable Elasticsearch cluster URL.
  • An API key or username/password with access to the indices you want Claude to query.
  • An MCP client (Claude Code or Claude Desktop).

Security

  • Authenticate with an API key (ES_API_KEY) or basic credentials; scope it to read-only on only the indices Claude should reach.
  • Treat ES_URL and credentials as secrets — keep them in the MCP client config or environment.
  • ES_SSL_SKIP_VERIFY disables TLS verification and is intended for development only.
  • The search and esql tools execute live read queries, so a broad query can add cluster load.

Source Verification Notes

Verified on 2026-06-17:

  • The official repository github.com/elastic/mcp-server-elasticsearch documents the docker.elastic.co/mcp/elasticsearch image, the stdio and streamable-HTTP modes, the ES_URL/ES_API_KEY configuration, and the five tools listed above (Apache-2.0).
  • Elastic's Search Labs write-up describes the server's purpose and capabilities.
  • Claude Code's MCP documentation describes the connector setup pattern used here.

Source citations

Add this badge to your README

Show that Elasticsearch MCP Server for Claude is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/elasticsearch-mcp-server.svg)](https://heyclau.de/entry/mcp/elasticsearch-mcp-server)

How it compares

Elasticsearch MCP Server for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldElasticsearch MCP Server for Claude

Connect Claude to your Elasticsearch cluster — search indices, inspect mappings, run ES|QL, and check shard health — with Elastic's official Model Context Protocol server.

Open dossier
Elastic Agent Builder MCP Server for Claude

Official Elastic Agent Builder MCP server endpoint for connecting Claude, Cursor, VS Code, and other MCP clients to Elastic Agent Builder tools through Kibana with API-key scoped access to Elasticsearch indices and Agent Builder privileges.

Open dossier
Meilisearch MCP Server for Claude

Connect Claude to Meilisearch — manage indexes, add and search documents, tune settings, and monitor tasks — with Meilisearch's official Model Context Protocol server.

Open dossier
Weaviate MCP Server for Claude

Connect Claude to a Weaviate vector database — run hybrid search, inspect collection config, list tenants, and upsert objects — using Weaviate's built-in Model Context Protocol server.

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Categorymcpmcpmcpmcp
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorElasticElasticMeilisearchWeaviate
Added2026-06-172026-06-042026-06-172026-06-17
Platforms
Claude CodeCodexCursorClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Source repo
Safety notesSearch, ES|QL, and shard tools run live read queries against the configured cluster; a broad or expensive query can add load. Scope the Elasticsearch API key to least privilege (read-only on the indices Claude should see) before connecting.Elastic Agent Builder MCP executes with the scope assigned to the API key. Treat the API key as the effective permission boundary for every index, space, inference endpoint, and Agent Builder tool exposed to Claude. Do not use a broad administrator API key for exploratory chats. Elastic's docs recommend setting API key expiration dates and limiting access to only the indices the tools need to query. The example API key privileges include `read` and `view_index_metadata` for selected indices plus Kibana application privileges such as `feature_agentBuilder.read` and `feature_actions.read`. Keep those permissions as narrow as the workflow allows. Agent Builder tools can route AI clients into Elastic data exploration workflows. Require human review before using assistant-generated findings to change detections, alerts, response processes, dashboards, workflows, or production investigation decisions. If your Kibana deployment uses multiple spaces, verify the MCP URL includes the intended space path before connecting the client. A wrong space can expose the wrong tools, saved objects, or index access assumptions. `npx mcp-remote` is a local bridge process. Pin or review runtime dependencies when reproducibility or endpoint trust is required, and avoid running the bridge from untrusted project directories.Tools create and delete indexes and documents and rotate API keys — scope the key and confirm destructive actions. Settings and index deletes change live search behavior; review before running them through Claude.The MCP server runs inside your Weaviate instance and respects its existing RBAC; scope the API key to least privilege. The object-upsert tool writes data — restrict write access to the collections Claude should modify.
Privacy notesIndex data, field mappings, and query results enter the MCP client context and the model's prompt. ES_URL and ES_API_KEY are secrets — store them in the client config or environment, never in shared repositories.Elastic Agent Builder MCP can expose log events, metrics, traces, security alerts, documents, index mappings, inference context, saved tool behavior, and Agent Builder outputs to the connected AI client. Index names, field names, mappings, document samples, query results, and investigation prompts can reveal internal service names, user identifiers, customer data, infrastructure details, secrets accidentally present in logs, or security investigation context. Store Elastic API keys outside prompts, shell history, committed MCP config, screenshots, tickets, and shared chat transcripts. Rotate keys after exposure and prefer short-lived keys for development. Claude transcripts, IDE logs, MCP client logs, terminal history, support bundles, and generated investigation notes may retain Elastic-derived data outside Elastic's normal access controls and retention policies. The MCP endpoint runs through Kibana. Review Elastic deployment access, Kibana space membership, API key scopes, and any external AI-client data retention policy before connecting regulated or customer-sensitive indices.Indexed documents and search results enter the MCP client context and the model's prompt. MEILI_HTTP_ADDR and MEILI_MASTER_KEY are secrets — keep them in the client config or environment.Query text, retrieved objects, and collection metadata enter the MCP client context and the model's prompt. The Weaviate endpoint URL and API key are secrets — keep them in the client config or environment, not in shared repositories.
Prerequisites
  • Docker installed (the server is distributed as the docker.elastic.co/mcp/elasticsearch image).
  • An Elasticsearch cluster URL (ES_URL) you can reach.
  • An Elasticsearch API key (ES_API_KEY) or username/password (ES_USERNAME + ES_PASSWORD).
  • An MCP client such as Claude Code or Claude Desktop.
  • Elastic deployment with Kibana and Elastic Agent Builder available.
  • Kibana URL for the target deployment; custom Kibana spaces use `/s/{SPACE_NAME}/api/agent_builder/mcp`.
  • MCP-capable client such as Claude Desktop, Claude Code, Cursor, VS Code, or another client that can run `npx mcp-remote`.
  • Node.js and npm available for the documented `npx mcp-remote` bridge.
  • A reachable Meilisearch instance URL (MEILI_HTTP_ADDR).
  • A Meilisearch master or API key (MEILI_MASTER_KEY) when your instance requires authentication.
  • uv (uvx) or pip to run meilisearch-mcp, or Docker (getmeili/meilisearch-mcp).
  • An MCP client such as Claude Code or Claude Desktop.
  • A Weaviate instance on v1.37.1 or later (self-hosted or Weaviate Cloud).
  • The MCP server enabled on that instance via MCP_SERVER_ENABLED=true.
  • A Weaviate API key with the RBAC permissions for the collections Claude should reach.
  • An MCP client such as Claude Code or Claude Desktop.
Install
claude mcp add elasticsearch -- docker run -i --rm -e ES_URL=<your-cluster-url> -e ES_API_KEY=<your-api-key> docker.elastic.co/mcp/elasticsearch stdio
npx mcp-remote ${KIBANA_URL}/api/agent_builder/mcp --header 'Authorization:ApiKey ${API_KEY}'
claude mcp add meilisearch -e MEILI_HTTP_ADDR=<your-meili-url> -e MEILI_MASTER_KEY=<your-key> -- uvx -n meilisearch-mcp
claude mcp add --transport http weaviate https://<your-weaviate-host>/v1/mcp
Config
{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "ES_URL", "-e", "ES_API_KEY",
        "docker.elastic.co/mcp/elasticsearch", "stdio"
      ],
      "env": {
        "ES_URL": "<elasticsearch-cluster-url>",
        "ES_API_KEY": "<elasticsearch-api-key>"
      }
    }
  }
}
{
  "mcpServers": {
    "elastic-agent-builder": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "${KIBANA_URL}/s/${SPACE_NAME}/api/agent_builder/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "KIBANA_URL": "${KIBANA_URL}",
        "SPACE_NAME": "default",
        "AUTH_HEADER": "ApiKey ${API_KEY}"
      }
    }
  }
}
{
  "mcpServers": {
    "meilisearch": {
      "command": "uvx",
      "args": ["-n", "meilisearch-mcp"],
      "env": {
        "MEILI_HTTP_ADDR": "<your-meili-url>",
        "MEILI_MASTER_KEY": "<your-key>"
      }
    }
  }
}
{
  "mcpServers": {
    "weaviate": {
      "url": "https://<your-weaviate-host>/v1/mcp",
      "type": "http"
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.