Elasticsearch MCP server
io.github.cr7258/elasticsearch-mcp-server·v2.0.15·308 starsMCP server for interacting with Elasticsearch
308 stars1.8k downloads/wk
Reviews
Write oneNobody has reviewed Elasticsearch yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Elasticsearch tools (19, 9 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
create_data_streamwrite actionCreate a new data stream.
create_indexwrite actionCreate a new index.
delete_aliaswrite actionDelete an alias for a specific index.
delete_by_querywrite actionDeletes documents matching the provided query.
delete_data_streamwrite actionDelete one or more data streams.
delete_documentwrite actionDelete a document by ID.
delete_indexwrite actionDelete an index.
general_api_requestPerform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
get_aliasGet alias information for a specific index.
get_cluster_healthReturns basic information about the health of the cluster.
get_cluster_statsReturns high-level overview of cluster statistics.
get_data_streamGet information about one or more data streams.
get_documentGet a document by ID.
get_indexReturns information (mappings, settings, aliases) about one or more indices.
index_documentwrite actionCreates or updates a document in the index.
list_aliasesList all aliases.
list_indicesList all indices.
put_aliaswrite actionCreate or update an alias for a specific index.
search_documentsSearch for documents.
Public scan report
scanner v0.1.10 · 2026-10-01 · same rubric, same numbers if you re-run it
- Code scan32 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 46 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Elasticsearch compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 78/100
- higher than 57% of 48,273 servers
- Tools
- 19
- the typical server has 7
- Tools that change things
- 47%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 308
- more than 95% of 28,534 servers
- Downloads a week
- 1,774
- more than 95% of 11,915 servers with a package
What its tools let an agent do: 10 read · 2 create · 2 change · 5 delete
Install Elasticsearch in Claude Code, Cursor or VS Code
claude mcp add elasticsearch-mcp-server -- uvx elasticsearch-mcp-server
What the publisher says
From the Elasticsearch repository's README, as published. We do not edit it. Read it on GitHub
Elasticsearch/OpenSearch MCP Server
Overview
A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.
Demo
https://github.com/user-attachments/assets/f7409e31-fac4-4321-9c94-b0ff2ea7ff15
Features
General Operations
- generalapirequest: Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
Index Operations
- list_indices: List all indices.
- get_index: Returns information (mappings, settings, aliases) about one or more indices.
- create_index: Create a new index.
- delete_index: Delete an index.
- createdatastream: Create a new data stream (requires matching index template).
- getdatastream: Get information about one or more data streams.
- deletedatastream: Delete one or more data streams and their backing indices.
Document Operations
- search_documents: Search for documents.
- index_document: Creates or updates a document in the index.
- get_document: Get a document by ID.
- delete_document: Delete a document by ID.
- deletebyquery: Deletes documents matching the provided query.
Cluster Operations
- getclusterhealth: Returns basic information about the health of the cluster.
- getclusterstats: Returns high-level overview of cluster statistics.
Alias Operations
- list_aliases: List all aliases.
- get_alias: Get alias information for a specific index.
- put_alias: Create or update an alias for a specific index.
- delete_alias: Delete an alias for a specific index.
Analyzer Operations
- analyze_text: Analyze text using a specified analyzer or custom analysis chain. Useful for debugging search queries and understanding how text is tokenized.
Configure Environment Variables
The MCP server supports the following environment variables:
Basic Authentication (Username/Password)
- ELASTICSEARCH_USERNAME: Username for basic authentication
- ELASTICSEARCH_PASSWORD: Password for basic authentication
- OPENSEARCH_USERNAME: Username for OpenSearch basic authentication
- OPENSEARCH_PASSWORD: Password for OpenSearch basic authentication
API Key Authentication (Elasticsearch only) - Recommended
- ELASTICSEARCHAPIKEY: API key for Elasticsearch or Elastic Cloud Authentication.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Elasticsearch: common questions
- Is Elasticsearch MCP server safe?
- Mostly: it is graded B (78/100). Read the Elasticsearch safety report
- How do I install Elasticsearch?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Elasticsearch need an API key?
- Yes. The registry entry asks for
ELASTICSEARCH_API_KEY,ELASTICSEARCH_PASSWORD. - Is Elasticsearch maintained?
- The last commit was 78 days ago (2026-08-16). The latest release is v2.0.15.
- How does Elasticsearch compare with other MCP servers?
- safety score 78/100 (higher than 57% of 48,273 servers); tools 19 (the typical server has 7); tools that change things 47% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.