elasticsearch-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ES_URL | No | Cluster URL. Default http://localhost:9200. | http://localhost:9200 |
| ES_API_KEY | No | Preferred authentication. The encoded value from POST _security/api_key. | |
| ES_CA_CERT | No | CA bundle path for self-signed TLS, such as http_ca.crt. | |
| ES_PASSWORD | No | Password for basic auth, used when ES_API_KEY is empty. | |
| ES_USERNAME | No | Username for basic auth, used when ES_API_KEY is empty. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only access to an Elasticsearch cluster. Find indices with list_indices, read field names and types with get_mappings, then query with search (Query DSL) or esql (ES|QL).
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
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_indicesA | List indices matching a pattern such as "logs-*" or "a,b", with health, status, doc count and size. |
| get_mappingsA | Get the field names and types of an index or pattern. Read them before writing a search or ES|QL query. |
| searchA | Run a Query DSL search. |
| esqlA | Run an ES|QL query (Elasticsearch 8.11+), for example 'FROM logs-* | STATS errors = COUNT(*) BY host.name | SORT errors DESC | LIMIT 10'. Returns columns and rows. |
| get_shardsA | Show shards for indices matching a pattern: primary or replica, state, docs, size and node. |
| cluster_healthB | Cluster health: status (green, yellow or red), node count and shard counts. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| elasticsearch | Answer a question from your Elasticsearch data, or give a cluster overview when no question is given. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a recognizable target: index metadata (list_indices, get_mappings), querying (search, esql), shard inspection (get_shards), and cluster status (cluster_health). The only mild overlap is search vs. esql, but the descriptions clearly differentiate Query DSL from ES|QL syntax, so an agent can pick correctly.
The set follows a verb_noun convention (list_indices, get_mappings, get_shards, cluster_health is the only noun-only name). Minor deviation, but overall readable and predictable.
Six tools is well-scoped for a read-only Elasticsearch inspection server; each tool covers a distinct aspect (indices, mappings, search, ES|QL, shards, cluster health) without redundancy.
Covers the core read/query lifecycle: discover indices, inspect schema, run DSL and ES|QL queries, and check shard/cluster status. Gaps exist (no fetch-document-by-id, no write/index/delete operations), but these are minor for a read-oriented toolset and workable via search.