← 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:latestEnvironment Variables
Set these before running Custom Elasticsearch MCP Server.
VariableDescriptionRequired
ES_URLYour Elasticsearch URLNoMAX_CONNECTIONSMaximum concurrent connectionsNoMAX_KEEPALIVE_CONNECTIONSMaximum keepalive connectionsNoCONNECTION_TIMEOUTConnection timeout in secondsNoREQUEST_TIMEOUTRequest timeout in secondsNoAvailable Tools (4)
Once configured, Custom Elasticsearch MCP Server gives your AI agent access to:
list_indicesList all indices with an optional pattern filter.patternsearchPerform a search using full Elasticsearch Query DSL.queryget_mappingsRetrieve field mappings for a specific index.indexget_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.