elasticsearch-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ES_HOST | Yes | Elasticsearch host URL | |
| ES_API_KEY | No | API key authentication | |
| ES_CLOUD_ID | No | Elastic Cloud ID | |
| ES_PASSWORD | No | Password for basic authentication | |
| ES_USERNAME | No | Username for basic authentication | |
| ES_READ_ONLY | No | Block all write operations | false |
| ES_MAX_RESULTS | No | Maximum results per query | 1000 |
| ES_BLOCKED_INDICES | No | Indices to hide | .security*,... |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connectA | Connect to the Elasticsearch cluster. Uses configuration from environment variables (ES_HOST, ES_API_KEY, etc.). Returns: Connection status and cluster information. |
| disconnectA | Disconnect from the Elasticsearch cluster. Returns: Disconnection status. |
| cluster_healthA | Get the health status of the Elasticsearch cluster. Returns: Cluster health including status (green/yellow/red), nodes, and shards. |
| cluster_infoA | Get cluster version and information. Returns: Cluster name, version, build info, and compatibility versions. |
| list_nodesA | List all nodes in the cluster. Returns: Node names, IPs, roles, and resource usage (CPU, memory, disk). |
| cluster_statsA | Get cluster-wide statistics. Returns: Aggregated statistics for indices and nodes across the cluster. |
| list_indicesA | List all indices in the cluster. Args: pattern: Index pattern to filter (supports wildcards like "logs-*"). include_hidden: Include hidden indices starting with "." (default: False). Returns: List of indices with health, status, doc count, and size. |
| describe_indexA | Get detailed information about an index. Args: index: Name of the index to describe. Returns: Index mappings (fields and types), settings, and statistics. |
| get_index_statsB | Get statistics for an index. Args: index: Name of the index. Returns: Document counts, store size, indexing and search statistics. |
| get_mappingsB | Get field mappings for an index. Args: index: Name of the index. Returns: Field definitions including types, analyzers, and options. |
| get_aliasesA | Get index aliases. Args: index: Optional index name to filter aliases. Returns: List of aliases with their target indices. |
| es_searchA | Execute a search query using Elasticsearch Query DSL. Args: index: Index to search (supports wildcards like "logs-*"). query: Elasticsearch query DSL (e.g., {"match": {"message": "error"}}). size: Maximum results to return (default: 10, max: from config). from_: Starting offset for pagination. sort: Sort specification (e.g., [{"@timestamp": "desc"}]). Returns: Search hits with _id, _score, and _source fields. |
| search_simpleA | Execute a simple query string search. Args: index: Index to search. q: Query string (supports Lucene syntax like "status:error AND level:critical"). size: Maximum results to return. Returns: Search hits matching the query string. |
| count_docsA | Count documents matching a query. Args: index: Index to count. query: Optional query to filter documents. Returns: Document count. |
| get_documentB | Get a document by ID. Args: index: Index containing the document. doc_id: Document ID. Returns: Document source data or not found error. |
| aggregateB | Execute an aggregation query. Args: index: Index to aggregate. aggs: Aggregation definition (e.g., {"status_count": {"terms": {"field": "status"}}}). query: Optional query to filter documents before aggregating. Returns: Aggregation results with buckets and metrics. |
| terms_aggregationB | Get top values for a field (terms aggregation). Args: index: Index to aggregate. field: Field to get top values for (must be keyword or numeric). size: Number of top terms to return (default: 10). query: Optional query to filter documents. Returns: Top field values with document counts. |
| date_histogramA | Get document counts over time (date histogram). Args: index: Index to aggregate. field: Date field to aggregate on (e.g., "@timestamp"). interval: Time interval (minute, hour, day, week, month, year). query: Optional query to filter documents. Returns: Time buckets with document counts. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose. Aggregation tools are differentiated by type (general, date histogram, terms), search tools by query language, and cluster/index/document operations cover separate concerns without overlap.
All tool names follow a consistent snake_case convention with descriptive verb-noun patterns (e.g., list_indices, get_document, search_simple), making them predictable and easy to navigate.
18 tools is appropriate for an Elasticsearch MCP server, covering connection, cluster, indices, documents, search, and aggregations without being excessive or insufficient.
The tool set lacks fundamental CRUD operations for indices (create, delete, update) and documents (create, update, delete), leaving significant gaps for basic data management tasks.