Configure the streamable-HTTP protocol
mainUse the streamable-HTTP protocol for web-based integrations or to support multiple concurrent clients.
Required Environment Variables:
ES_URL: The URL of your Elasticsearch cluster.- Authentication (choose one):
ES_API_KEY: Your Elasticsearch API key.ES_USERNAMEandES_PASSWORD: Your Elasticsearch credentials.
- Optional:
ES_SSL_SKIP_VERIFY: Set totrueto skip SSL/TLS certificate verification.
Run via Docker:
docker run --rm \
-e ES_URL \
-e ES_API_KEY \
-p 8080:8080 \
docker.elastic.co/mcp/elasticsearch \
httpEndpoints:
- MCP endpoint:
http://<host>:8080/mcp - Health check:
http://<host>:8080/ping(returnspongif healthy).
Claude Desktop with HTTP proxy:
If your client only supports stdio (like the free edition of Claude Desktop), use mcp-proxy to bridge the connection:
- Install
mcp-proxy:
uv tool install mcp-proxy- Add this to Claude Desktop configuration:
{
"mcpServers": {
"elasticsearch-mcp-server": {
"command": "/<home-directory>/.local/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"--header", "Authorization", "ApiKey <elasticsearch-API-key>",
"http://<mcp-server-host>:<mcp-server-port>/mcp"
]
}
}
}