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?

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.

Credentials and setup notes

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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

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
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

How to install the Elasticsearch MCP Server

{
  "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": "YOUR_ES_API_KEY"
      }
    }
  }
}

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

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_URLDeclared in the maintainer’s client configuration.Check documentation
ES_API_KEYDeclared in the maintainer’s client configuration.Check documentation

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.