Elasticsearch · elastic — Claude Code MCP server: query indices
This MCP server lets AI agents query Elasticsearch indices in natural language. It is deprecated and will receive critical security updates only.
no license updated 2026-10-29
Open on GitHubWhat Elasticsearch does
The server connects an AI agent to Elasticsearch through the Model Context Protocol. An agent can query indices and retrieve records from a natural-language request, without a custom API for each task. Choose stdio for a direct client connection or streamable-HTTP for web integrations and concurrent clients.
You need an Elasticsearch 8.x or 9.x cluster reachable from AWS, Docker, network access to the cluster, and valid credentials. Set ES_URL and authenticate with either ES_API_KEY or ES_USERNAME plus ES_PASSWORD. For stdio, start the container with docker run -i --rm -e ES_URL -e ES_API_KEY docker.elastic.co/mcp/elasticsearch stdio; HTTP mode uses http and port 8080. The connection will fail if the cluster cannot be reached or the credentials are invalid.
Elastic has deprecated this server and plans to provide critical security updates only. Its suggested replacement is the MCP endpoint in Elastic Agent Builder, available in Elastic 9.2.0+ and Elasticsearch Serverless projects. That status matters when choosing a server for a new deployment.
What it helps with
- query Elasticsearch indices with natural-language requests
- retrieve cluster records without creating a separate API for each task
- connect concurrent clients through streamable-HTTP
- check whether an agent can access Elasticsearch indices
Example prompts for the agent
- Search my Elasticsearch indices for records related to …
- Analyze the data in my Elasticsearch cluster and return matching documents.
- Check whether you can retrieve records from the Elasticsearch indices.
How to install Elasticsearch
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Elasticsearch
How do I install Elasticsearch MCP server for Claude Code?
Have an Elasticsearch 8.x or 9.x cluster reachable from AWS, Docker, and valid credentials ready. Set ES_URL and ES_API_KEY, then run docker run -i --rm -e ES_URL -e ES_API_KEY docker.elastic.co/mcp/elasticsearch stdio. You can use ES_USERNAME and ES_PASSWORD instead of an API key.
What does Elasticsearch MCP server do?
It connects an AI agent to Elasticsearch indices over MCP, so the agent can query and retrieve data from natural-language requests.
Which protocols does Elasticsearch MCP server support?
It supports stdio for direct client connections and streamable-HTTP for web integrations or concurrent clients. SSE is deprecated; the documentation recommends streamable-HTTP.
Similar MCP servers
All MCP servers for Data and databases →Elasticsearch by other authors comes first.