Skip to main content
Glama
elasticsearch-mcp

elasticsearch-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ES_URLNoCluster URL. Default http://localhost:9200.http://localhost:9200
ES_API_KEYNoPreferred authentication. The encoded value from POST _security/api_key.
ES_CA_CERTNoCA bundle path for self-signed TLS, such as http_ca.crt.
ES_PASSWORDNoPassword for basic auth, used when ES_API_KEY is empty.
ES_USERNAMENoUsername 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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. body is the full _search request body, for example {"query": {"match": {"title": "shoes"}}, "size": 5}. Aggregations, sort and _source filtering work as usual; omit body to get the first 10 documents.

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

NameDescription
elasticsearchAnswer 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

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 6 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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.