← Back to Custom Elasticsearch MCP Server

Install Custom Elasticsearch MCP Server

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add custom-elasticsearch -- docker run -i --rm --add-host=host.docker.internal:host-gateway -e ES_URL=http://host.docker.internal:9400 elasticsearch-mcp:latest

Environment Variables

Set these before running Custom Elasticsearch MCP Server.

VariableDescriptionRequired
ES_URLYour Elasticsearch URLNo
MAX_CONNECTIONSMaximum concurrent connectionsNo
MAX_KEEPALIVE_CONNECTIONSMaximum keepalive connectionsNo
CONNECTION_TIMEOUTConnection timeout in secondsNo
REQUEST_TIMEOUTRequest timeout in secondsNo

Available Tools (4)

Once configured, Custom Elasticsearch MCP Server gives your AI agent access to:

list_indicesList all indices with an optional pattern filter.
pattern
searchPerform a search using full Elasticsearch Query DSL.
query
get_mappingsRetrieve field mappings for a specific index.
index
get_shardsView cluster shard information.

Try It Out

After setup, try these prompts with your AI agent:

Show me all elasticsearch indices
Search for sales data in hq.sales index
What fields are in the hq.menuitems index?
Show me the elasticsearch cluster status
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Docker installed and running

Keep this setup from going cold

Save the docs, env vars, and workflow around Custom Elasticsearch MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup