Skip to main content
Glama
maestra-io

Elasticsearch MCP Server

by maestra-io

Elasticsearch MCP Server

A read-only MCP (Model Context Protocol) server for Elasticsearch, providing secure access to ES 7.10 clusters via Streamable HTTP transport with Google OAuth + static Bearer token authentication.

Tools

  • es_cluster_info — cluster name, version, tagline

  • es_cluster_health — cluster status, nodes, shards

  • es_index_list — all indices with health, doc count, storage size

  • es_search — full Query DSL search with pagination, sorting, source filtering

Related MCP server: Elasticsearch MCP Server

Environment Variables

Variable

Required

Default

Description

ES_ADDRESSES

yes

Comma-separated ES node URLs

API_TOKENS

yes

Comma-separated static Bearer tokens

PORT

no

8080

HTTP listen port

PUBLIC_URL

no

https://mta-logs-elasticsearch-mcp.maestra.io

Public URL for OAuth redirects

GOOGLE_CLIENT_ID

no

Enables Google OAuth when set

GOOGLE_CLIENT_SECRET

no

Required with GOOGLE_CLIENT_ID

ES_TIMEOUT

no

30000

ES request timeout (ms)

ES_MAX_RETRIES

no

3

Max retries on 502/503/504/429

MAX_SESSIONS

no

1000

Max concurrent MCP sessions

Development

npm install
npm run build
npm run dev    # tsx watch mode
npm test       # vitest

Docker

docker build -t mcp-elasticsearch .
docker run -e ES_ADDRESSES=http://es:9200 -e API_TOKENS=my-token -p 8080:8080 mcp-elasticsearch

Authentication

  1. Static Bearer tokens — for programmatic access and Teleport

  2. Google OAuth + PKCE — for interactive access via Claude Code (restricted to @maestra.io)

Auth is handled entirely in the application; no Traefik middleware required.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that enables interaction with Elasticsearch and OpenSearch clusters for searching documents and managing indices. It provides tools for cluster health monitoring, index configuration, and general API requests.
    16
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides tools and resources to interact with Elasticsearch clusters, including listing indices, searching, and retrieving mappings.
    3
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Read-only MCP server for exploring and searching OpenSearch clusters, enabling log analysis, index exploration, and query execution.
    8
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    A read-only MCP server for investigating Amazon OpenSearch Service domains using natural language, with tools for cluster health, index management, search, and diagnostics, secured by allowed profiles and regions.
    20
    MIT