Elasticsearch MCP Server

Connects Elasticsearch data to any Model Context Protocol (MCP) Client, enabling natural language interaction.

Local serverstdio 702

What is the Elasticsearch MCP server?

If you already use Elasticsearch, the elasticsearch mcp server is the piece that lets your assistant work with it directly. Connects Elasticsearch data to any Model Context Protocol (MCP) Client, enabling natural language interaction.

What the server does

The Elasticsearch MCP Server connects your AI agents to Elasticsearch data using the Model Context Protocol (MCP). It enables natural language interactions with your Elasticsearch indices, allowing agents to query, analyze, and retrieve data without custom APIs.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • list_indices — List all available Elasticsearch indices
  • get_mappings — Get field mappings for a specific Elasticsearch index
  • search — Perform an Elasticsearch search using query DSL
  • esql — Execute an ES|QL query
  • get_shards — Get shard information for all or specific indices

Credentials and setup notes

Configuration is passed through the environment: ES_URL, ES_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Before you start, ensure you have: - An Elasticsearch cluster (version 8.x or 9.x) accessible from your AWS environment - Elasticsearch authentication credentials: - An API key, or - A username and password pair - Docker installed and running in your AWS environment (for example, on an

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Elasticsearch's toolset — list_indices, get_mappings, search and 2 more — is a fair guide to whether it matches your workflow. It is maintained by elastic; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
list_indicesList all available Elasticsearch indices
get_mappingsGet field mappings for a specific Elasticsearch index
searchPerform an Elasticsearch search using query DSL
esqlExecute an ES|QL query
get_shardsGet shard information for all or specific indices

Configuration

Before you start, ensure you have: - An Elasticsearch cluster (version 8.x or 9.x) accessible from your AWS environment - Elasticsearch authentication credentials: - An API key, or - A username and password pair - Docker installed and running in your AWS environment (for example, on an

VariableDescriptionRequired
ES_URLEndpoint or connection string the server talks to.Yes
ES_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Elasticsearch to list indices.
  • Use Elasticsearch to get mappings.
  • Use Elasticsearch to search.

Frequently asked questions

Key features include listing available Elasticsearch indices, inspecting field mappings, executing queries using full Query DSL with highlighting, and seamless integration with MCP Clients.