Creativity · MCP — server

MCP Elasticsearch Server

The MCP Elasticsearch server exposes search, aggregation, and index-management operations from an Elasticsearch (or OpenSearch) cluster as Model Context Protocol tools. It's ideal for log exploration, observability chats, and 'explain this anomaly' workflows. Elastic maintains an official server under their MCP org on GitHub; several community versions also exist for OpenSearch-specific shapes.

MCP facts

Kind
server
Ecosystem
anthropic-mcp
Language
TypeScript / Python
Transports
stdio, http

Capabilities

  • Tools: search, msearch, get_mapping, list_indices, explain
  • Resources: index and alias metadata as MCP resources
  • Auth: API key or cloud_id + auth for Elastic Cloud

Install

npx -y @elastic/mcp-server-elasticsearch

Configuration

{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": ["-y", "@elastic/mcp-server-elasticsearch"],
      "env": {
        "ES_URL": "https://my-cluster.es.io:9243",
        "ES_API_KEY": "..."
      }
    }
  }
}

Frequently asked questions

What can I do with the MCP Elasticsearch server?

Ask natural-language questions like 'find the 10 slowest requests in the last hour' and have the model draft the DSL, run it, and summarize results. It also helps explore mappings and propose index settings.

Does it support OpenSearch?

The official Elastic server targets Elasticsearch specifically. Community servers like mcp-server-opensearch handle AWS OpenSearch or OpenSearch Project clusters.

How do I limit what the LLM can do?

Create a scoped Elasticsearch API key with read-only privileges on the indices you want the model to touch. Keep write operations (index creation, mapping updates) behind a separate, approval-gated server.

Sources

  1. Elastic MCP Server on GitHub — accessed 2026-04-20
  2. Elasticsearch Query DSL — accessed 2026-04-20