Official Python SDK for building Model Context Protocol servers and clients that connect LLM applications to tools, data and prompts.
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
Set the ES_URL and ES_API_KEY environment variables for your Elasticsearch cluster
- 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
The official TypeScript SDK for building Model Context Protocol servers and clients that give LLM applications standardized context.
An MCP server that connects AI agents to Exa for web search, page content fetching, and multi-step research.
An MCP server and CLI that gives AI coding agents tools to build, test and run iOS and macOS Xcode projects.
A Model Context Protocol server that connects Google Search Console data to AI assistants like Claude, Cursor and Codex for natural-language SEO analysis.
An MCP proxy server that aggregates multiple MCP servers behind a single HTTP endpoint for clients such as Claude.