Labsco
MCP SERVER

Custom Elasticsearch

by M0-AR

Query an Elasticsearch cluster with only a URL — for clusters where your key is already trusted.

NoSQL, Graph & Key-Value Stores
Summary
Built for the cluster you already have access to.

The official server wants a URL and an API key; on a host where your key is authorized, the second one is a credential you would have to create just to satisfy the tool. Dropping it, and making the index pattern optional, is the whole difference — plus a pooled async client so several assistants can query at once.

What it is

A four-tool Elasticsearch server for the case where authentication already happened at the network layer: your public key is authorized on the cloud host, so it needs the cluster URL and no API key. Written in Python around async I/O with a pooled HTTP client, so parallel requests from several clients do not queue behind each other.

What you get
  • Every index listed, with a pattern filter that is optional rather than required
  • Full Elasticsearch Query DSL against an index — the real query body, not a simplified wrapper
  • Field mappings for any index, for finding out what is actually in it before querying
  • Cluster shard information, for the health question
  • Connection pooling with keepalive and HTTP/2 multiplexing, defaulting to 100 concurrent connections and 20 kept alive
  • Timeouts and pool sizes set per deployment: MAX_CONNECTIONS, MAX_KEEPALIVE_CONNECTIONS, CONNECTION_TIMEOUT and REQUEST_TIMEOUT are all environment variables
Requirements

Docker, built from the repository, and a reachable Elasticsearch cluster. ES_URL points at it and defaults to http://localhost:9400. Nothing else is required — no API key. Reaching a cluster on the host from inside the container means running with --add-host=host.docker.internal:host-gateway and addressing it as host.docker.internal rather than localhost; where the cluster is behind an SSH tunnel, that tunnel has to be up before the client starts.

Setup effort

One command — docker build -t elasticsearch-mcp:latest .