Elasticsearch MCP Server

Elasticsearch MCP Server

Local serverstdioGo

What is the Elasticsearch MCP MCP server?

Elasticsearch mcp mcp server lets Claude, Cursor and other MCP clients work with Elasticsearch MCP directly. Elasticsearch MCP Server.

What Elasticsearch MCP does

MCP Server for connecting to your Elasticsearch cluster directly from any MCP Client (like Claude Desktop, Cursor).

Tools it exposes

Once connected, the assistant can call these 14 tools directly:

  • elasticsearch_health — Get Elasticsearch cluster health status, optionally including index-level details
  • list_indices — List available Elasticsearch indices, support regex
  • create_index — Create Elasticsearch index with optional settings and mappings
  • reindex — Reindex data from a source index to a target index with optional query and script
  • get_mappings — Get field mappings for a specific Elasticsearch index
  • create_mapping — Create or update mapping structure for an Elasticsearch index
  • search — Perform an Elasticsearch search with the provided query DSL
  • bulk — Bulk data into an Elasticsearch index
  • create_index_template — Create or update an index template
  • get_index_template — Get information about index templates
  • delete_index_template — Delete an index template
  • ES_HOST — Your Elasticsearch instance URL(s) - supports single URL or comma-separated multiple URLs (also supports legacy HOST)
  • ES_API_KEY — Elasticsearch API key for authentication (also supports legacy API_KEY)
  • ES_USERNAME — Elasticsearch username for basic authentication (also supports legacy USERNAME)

Installing the elasticsearch mcp mcp server

Setup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.

Configuration

Before the server will start you need to supply 2 environment variables: ES_HOST, ES_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • An Elasticsearch instance * Elasticsearch authentication credentials (API key or username/password) * MCP Client (e.g. Claude Desktop, Cursor)

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Elasticsearch MCP sits in that group, and the shape of its toolset — elasticsearch_health, list_indices, create_index among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • With 14 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Elasticsearch MCP.
  • Maintained by awesimon, written in Go.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the elasticsearch mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
elasticsearch_healthGet Elasticsearch cluster health status, optionally including index-level details
list_indicesList available Elasticsearch indices, support regex
create_indexCreate Elasticsearch index with optional settings and mappings
reindexReindex data from a source index to a target index with optional query and script
get_mappingsGet field mappings for a specific Elasticsearch index
create_mappingCreate or update mapping structure for an Elasticsearch index
searchPerform an Elasticsearch search with the provided query DSL
bulkBulk data into an Elasticsearch index
create_index_templateCreate or update an index template
get_index_templateGet information about index templates
delete_index_templateDelete an index template
ES_HOSTYour Elasticsearch instance URL(s) - supports single URL or comma-separated multiple URLs (also supports legacy HOST)
ES_API_KEYElasticsearch API key for authentication (also supports legacy API_KEY)
ES_USERNAMEElasticsearch username for basic authentication (also supports legacy USERNAME)

How to install the Elasticsearch MCP MCP server

{
     "mcpServers": {
       "elasticsearch-mcp": {
         "command": "npx",
         "args": [
           "-y",
           "@awesome-ai/elasticsearch-mcp"
         ],
         "env": {
           "ES_HOST": "your-elasticsearch-host",
           "ES_API_KEY": "your-api-key"
         }
       }
     }
   }

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

Configuration

  • An Elasticsearch instance * Elasticsearch authentication credentials (API key or username/password) * MCP Client (e.g. Claude Desktop, Cursor)
VariableDescriptionRequired
ES_HOSTEndpoint or connection string the server talks to.Optional
ES_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Elasticsearch MCP to elasticsearch health.
  • Use Elasticsearch MCP to list indices.
  • Use Elasticsearch MCP to create index.

Frequently asked questions

It connects Elasticsearch MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (elasticsearch_health, list_indices, create_index, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Elasticsearch MCP directly.