Get the FREE Ultimate OpenClaw Setup Guide →

elasticsearch

Elasticsearch MCP server with available features including mappings management, search and indexing, and index management etc.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio awesimon-elasticsearch-mcp npx -y @awesome-ai/elasticsearch-mcp \
  --env ES_HOST="your-elasticsearch-host" \
  --env ES_API_KEY="your-api-key"

How to use

This MCP server enables natural language access to your Elasticsearch cluster. It exposes a set of MCP operations that map to common Elasticsearch actions such as health checks, index management, mappings, searches, and bulk data operations. You can interact with your Elasticsearch data through an MCP client (for example Claude Desktop or Cursor) by asking natural language questions. The server translates those requests into Elasticsearch API calls and returns structured results that you can present to users in a readable format.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to an Elasticsearch cluster (with suitable credentials)

Step-by-step installation:

  1. Install the MCP server package via npx (as shown in the example configuration):
# This assumes you have a working MCP client setup and will configure it to point to the MCP package
  1. Install dependencies and prepare your environment:
# If you are developing locally, ensure you have Node.js v18+ (or the version required by the package)
npm install
  1. Start using the MCP server from your MCP client:
{
  "mcpServers": {
    "elasticsearch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@awesome-ai/elasticsearch-mcp"
      ],
      "env": {
        "ES_HOST": "your-elasticsearch-host",
        "ES_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Verify connectivity by opening your MCP client and starting a new conversation with a question about your Elasticsearch data. The MCP client should connect to the server automatically if configured correctly.

Additional notes

Notes and tips:

  • You must provide authentication via ES_API_KEY or a combination of ES_USERNAME and ES_PASSWORD as described in the configuration notes.
  • The ES_HOST environment variable supports a single URL or a comma-separated list for multiple nodes (with automatic failover).
  • You can customize additional TLS options by exposing ES_CA_CERT if your cluster uses a self-signed certificate.
  • For multiple Elasticsearch nodes, include all hosts in ES_HOST, e.g. "https://es-node1:9200,https://es-node2:9200".
  • When testing locally, you can use the MCP Inspector to debug requests and view the request/response flow.
  • The available MCP capabilities cover cluster health, index operations (list, create, reindex), mappings (get, create), searches, bulk writes, and index template management.

Related MCP Servers

Sponsor this space

Reach thousands of developers