B

Elasticsearch MCP Server

Official Elastic MCP server for core Elasticsearch features including index listing, mapping inspection, search (Query DSL), ES|QL queries, and shard information.

Overall Score78/100

Score Breakdown

Server Info

Package
elasticsearch-core-mcp-server
Registry
crates.io
Maintainer
ElasticVendor
Category
Developer Tools
Tags
searchanalyticslogs
Last Scanned
7 Apr 2026

Findings

4 issues

Authentication & Identity

MEDIUMHTTP/SSE transport supports per-request credentials

Supports both stdio and HTTP (Streamable HTTP + SSE) transports. Auth via ES_URL (mandatory) plus ES_API_KEY or ES_USERNAME/ES_PASSWORD env vars. In HTTP mode, incoming Authorization headers are forwarded to Elasticsearch, enabling per-request auth. Config file with env var interpolation is also supported.

Remediation

Implement the MCP OAuth spec so users authenticate directly without platform mediation.

Tool Schema Quality

MEDIUMOnly 0 of 5 schemas have parameter constraints

Most schemas lack maxLength, enum, or pattern constraints on string parameters.

Remediation

Add constraints to string parameters, especially on write operations.

CRITICALDangerous execution surface: search

Tool allows raw code/query execution which could be exploited via prompt injection.

Remediation

Use parameterized queries or validated command sets.

CRITICALDangerous execution surface: esql

Tool allows raw code/query execution which could be exploited via prompt injection.

Remediation

Use parameterized queries or validated command sets.

Tools

5 total
NameDescriptionRisk
list_indicesList all available Elasticsearch indicesread
get_mappingsGet field mappings for a specific Elasticsearch indexread
searchPerform an Elasticsearch search with the provided query DSL.read
esqlPerform an Elasticsearch ES|QL query.read
get_shardsGet shard information for all or specific indices.read

Deploy Elasticsearch MCP Server securely

CompleteFlow adds per-user authentication, permission scoping, and audit logging to any MCP server out of the box.

Deploy on CompleteFlow