Overview
What is Elasticsearch?
This is a Model Context Protocol (MCP) server for Elasticsearch clusters. It enables LLMs to manage indices and execute search queries by exposing tools and index mapping resources.
How to use Elasticsearch?
Add the server to the mcpServers section of your claude_desktop_config.json using the command npx -y @modelcontextprotocol/server-elasticsearch <url> (e.g., http://localhost:9200). A local Elasticsearch instance can be started with the provided Docker one‑liner docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.11.3.
Key features of Elasticsearch?
- Execute search queries against indices using Elasticsearch Query DSL.
- Create new indices with optional mappings and settings.
- List all available indices.
- Index documents with an optional custom ID.
- Automatically discover index mappings as resources.
Use cases of Elasticsearch?
- Let an AI assistant search an Elasticsearch index for relevant documents.
- Automatically create new indices with proper mappings for application data.
- List all indices in a cluster to understand existing data organization.
- Index incoming documents