Elasticsearch MCP Server with multi-version support (ES 5.x-9.x) for security analysis and threats.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Elasticsearch.
list_indicesList indices with pattern filter, health filter, sorting and token-aware summary
get_mappingsGet field mappings with flat/tree/raw modes, field filtering and multi-index compare
es_searchFull Query DSL search with auto-highlight, plus harness field validation / auto-fix
lookup_fieldsFind the right field names: ECS vocabulary intersected with the index's real fields
execute_es_apiExecute any ES REST endpoint directly (GET/POST/PUT/DELETE/HEAD)
get_shardsShard info with health analysis, problem detection and recommendations
Enhanced Elasticsearch MCP Server Solution - Security & Threat Analysis Focused
This is a professional security-focused solution maintained by TocharianOU. It enables comprehensive interaction with all Elasticsearch APIs, specifically optimized for security analysis, threat detection, and incident investigation. Features include advanced security monitoring, anomaly detection, threat hunting, root cause analysis, and comprehensive audit capabilities.
Key Security Features:
Note: This solution is designed for security professionals, SOC teams, and threat analysts.
Connect to your Elasticsearch data directly from any MCP Client (such as Claude Desktop) using the Model Context Protocol (MCP). Interact with your Elasticsearch security data through natural language queries for advanced threat analysis and incident response.
Automatically supports Elasticsearch 5.x - 9.x with intelligent version detection:
| Version | Status | Client | Notes |
|---|---|---|---|
| ES 5.x | β | 5.6.22 | EOL - Basic tools only |
| ES 6.x | β | 6.8.8 | EOL - ILM available (6.6+) |
| ES 7.x | β | 7.17.14 | LTS - Full features |
| ES 8.x | β | 8.19.1 | Recommended - Latest features, ES|QL (8.11+) |
| ES 9.x+ | β | Auto-fallback | Future-ready |
Key Features:
What happens:
Since v0.9.0 the server ships a query harness: a deterministic layer between the AI model and your cluster. The design philosophy is simple:
The model steers; the harness knows. Intent ("find failed logins by user") belongs to the model. Correctness (real field names, aggregatability, version quirks) belongs to the harness.
What this means in practice β at the level of principles, not internals:
.keyword suffix on modern ECS mappings is
auto-corrected (and the correction is reported); an unknown field blocks the
doomed query and returns the nearest real fields instead of a provider error.lookup_fields.text + .keyword subfield vs. modern
bare keyword) are absorbed entirely by the harness. The same model behaves
identically against ES 5.6 and ES 9.x β verified by a version test matrix
covering nine watershed releases (5.6 β 9.0).skip_lint) when the model knows better β e.g. runtime fields defined
outside the query. The harness assists; it never imprisons.To connect to Elasticsearch with a self-signed certificate or in a test environment, you can set the following environment variable:
β οΈ This disables Node.js SSL certificate validation. Use only in development or testing environments. For production, always use a trusted CA certificate.
Install (or run) the server, point it at your cluster via environment variables, register it in your MCP client, then just start a conversation β the server connects and registers the tools your ES version supports.
The Elasticsearch MCP Server supports the following configuration options:
| Environment Variable | Description | Required |
|---|---|---|
ES_URL | Your Elasticsearch instance URL | Yes |
ES_API_KEY | Elasticsearch API key for authentication | No |
ES_USERNAME | Elasticsearch username for basic authentication | No |
ES_PASSWORD | Elasticsearch password for basic authentication | No |
ES_CA_CERT | Path to custom CA certificate for Elasticsearch SSL/TLS | No |
NODE_TLS_REJECT_UNAUTHORIZED | Set to 0 to disable SSL certificate validation | No |
| Environment Variable | Description | Default | Values |
|---|---|---|---|
MCP_TRANSPORT | Transport mode selection | stdio | stdio, http |
MCP_HTTP_PORT | HTTP server port (when using HTTP transport) | 3000 | 1-65535 |
MCP_HTTP_HOST | HTTP server host (when using HTTP transport) | localhost | Any valid host |
Transport Mode Details:
Install globally via NPM
Run directly
Download release package
.tar.gz file and its checksum files (.sha256 and .sha512)Verify package integrity
Extract and use
Clone the repository
Install Dependencies
Build the Project
Configure Claude Desktop App
Edit Config and add a new MCP Server with the following configuration:For NPM Installation:
For Source Installation:
Debugging with MCP Inspector (optional)
If npm install -g misbehaves:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/elasticsearch)<a href="https://allmcps.com/mcp/elasticsearch"><img src="https://allmcps.com/api/badge/elasticsearch?style=directory" alt="Elasticsearch on AllMCPs" /></a>