Skip to main content
Glama
schwarztim

Elastic MCP Server

by schwarztim

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging levelinfo
ELASTIC_URLYesElasticsearch cluster URL
ELASTIC_TIMEOUTNoRequest timeout in ms30000
ELASTIC_PASSWORDNoBasic auth password
ELASTIC_USERNAMENoBasic auth username
ELASTIC_API_KEY_IDNoAPI key ID (alternative to encoded)
ELASTIC_API_KEY_SECRETNoAPI key secret (use with ID)
ELASTIC_API_KEY_ENCODEDNoPre-encoded API key (base64)
ELASTIC_SKIP_SSL_VERIFYNoSkip SSL verificationfalse

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search

Execute a search query using Elasticsearch Query DSL. Supports full-text search, filters, aggregations, and sorting.

esql_query

Execute an ES|QL query for data analysis. ES|QL is a piped query language for filtering, transforming, and aggregating data.

get_document

Retrieve a specific document by its ID from an index.

count

Count documents in an index that match a query.

msearch

Execute multiple search queries in a single request for efficiency.

list_users

List all users in the Elasticsearch security realm.

get_user

Get detailed information about a specific user.

create_user

Create a new user with specified roles and permissions.

delete_user

Delete a user from Elasticsearch. This action cannot be undone.

set_user_enabled

Enable or disable a user account.

list_roles

List all roles defined in Elasticsearch.

get_role

Get detailed information about a specific role.

create_role

Create or update a role with specified cluster and index privileges.

delete_role

Delete a role from Elasticsearch.

list_api_keys

List API keys. Can filter by owner, name, or realm.

create_api_key

Create a new API key for authentication.

invalidate_api_key

Invalidate one or more API keys.

get_privileges

Get the privileges for the current authenticated user.

has_privileges

Check if the current user has specific cluster or index privileges.

authenticate

Get information about the currently authenticated user.

list_indices

List all indices in the cluster with their health, status, and document counts.

get_index

Get detailed information about a specific index including settings and mappings.

get_mappings

Get the field mappings for an index.

get_settings

Get the settings for an index.

create_index

Create a new index with optional settings, mappings, and aliases.

delete_index

Delete an index. WARNING: This permanently deletes all data in the index.

refresh_index

Refresh an index to make recent changes available for search.

get_index_stats

Get statistics for one or more indices including document counts, storage, and operations.

get_aliases

Get index aliases.

cluster_health

Get the health status of the Elasticsearch cluster including node counts, shard status, and overall health.

cluster_stats

Get comprehensive cluster statistics including indices, nodes, and resource usage.

cluster_info

Get basic cluster information including version and build details.

nodes_info

Get information about cluster nodes including roles, JVM settings, and plugins.

nodes_stats

Get statistics for cluster nodes including CPU, memory, disk, and index operations.

pending_tasks

Get a list of pending cluster-level tasks.

allocation_explain

Explain why a shard is unassigned or why it remains on its current node.

get_shards

Get detailed shard allocation information.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/schwarztim/elastic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server