Repolode
elastic

elastic/mcp-server-elasticsearch

An MCP server that lets AI agents query, analyze, and retrieve data from Elasticsearch indices using natural language. Deprecated.

Stars
725
Forks
161
Open issues
25
Last commit
9 hours ago

What is it?

The Elasticsearch MCP Server connects AI agents to Elasticsearch data through the Model Context Protocol. Agents can list indices, inspect field mappings, run query DSL searches, execute ES|QL queries, and check shard information, without a custom API layer.

The server runs as a Docker container and supports two transports: stdio for clients running alongside it, and streamable-HTTP for web integrations and concurrent clients. It authenticates with an Elasticsearch API key or a username and password, and it works with Claude Desktop, Cursor, VS Code, and other MCP-compatible clients.

The project is deprecated and only receives critical security updates. Elastic recommends the MCP endpoint in Agent Builder, available in Elastic 9.2.0+ and Elasticsearch Serverless projects.

Key features

  • 01Exposes list_indices, get_mappings, search, esql, and get_shards tools to MCP clients.
  • 02Supports stdio and streamable-HTTP transports.
  • 03Authenticates with an API key or basic username and password.
  • 04Ships as a Docker container image.
  • 05Provides an HTTP health check endpoint at /ping.

Use cases

  • Letting an AI assistant answer questions about data stored in Elasticsearch.
  • Connecting Claude Desktop or Cursor to a production Elasticsearch cluster for read-only exploration.
  • Running an MCP endpoint on AWS for multiple agent clients.

Quick start

  1. 1

    Set the ES_URL and ES_API_KEY environment variables for your Elasticsearch cluster

  2. 2

    Start the MCP server container in stdio mode

    docker run -i --rm -e ES_URL -e ES_API_KEY docker.elastic.co/mcp/elasticsearch stdio

Things to know

  • This server is deprecated and will only receive critical security updates.
  • Elastic recommends the Agent Builder MCP endpoint, available in Elastic 9.2.0+ and Serverless projects, instead.
  • The README's deployment instructions are written for the AWS Marketplace container image.

In collections

Topics

FAQ

What is mcp-server-elasticsearch?
An MCP server that lets AI agents query, analyze, and retrieve data from Elasticsearch indices using natural language. Deprecated. The Elasticsearch MCP Server connects AI agents to Elasticsearch data through the Model Context Protocol. Agents can list indices, inspect field mappings, run query DSL searches, execute ES|QL queries, and check shard information, without a custom API layer.
Is mcp-server-elasticsearch free to use? What license does it have?
mcp-server-elasticsearch is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is mcp-server-elasticsearch still maintained?
Actively maintained. The last commit to mcp-server-elasticsearch was on Oct 22, 2026.
What can I use mcp-server-elasticsearch for?
Letting an AI assistant answer questions about data stored in Elasticsearch. Connecting Claude Desktop or Cursor to a production Elasticsearch cluster for read-only exploration. Running an MCP endpoint on AWS for multiple agent clients.
How do I install mcp-server-elasticsearch?
Set the ES_URL and ES_API_KEY environment variables for your Elasticsearch cluster Start the MCP server container in stdio mode: docker run -i --rm -e ES_URL -e ES_API_KEY docker.elastic.co/mcp/elasticsearch stdio
Where can I get mcp-server-elasticsearch?
The source code and installation instructions are on GitHub: https://github.com/elastic/mcp-server-elasticsearch

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects