An AI-powered log analysis tool that connects Claude Desktop directly to your Elasticsearch cluster. Ask Claude questions about your logs in plain English and get intelligent insights.
Instead of writing complex Elasticsearch queries, just ask Claude things like:
- "Show me all 5xx errors from the last hour"
- "What's causing the slow database queries?"
- "Find unique IPs hitting my API in the last 5 minutes"
- "Is my Elasticsearch cluster healthy?"
Claude will search your logs, analyze patterns, and give you actionable insights.
cd mcp-elasticsearch
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
npm install -g @anthropic-ai/dxt
dxt init # Use 'mcp-elasticsearch-server.py' as entry point
dxt pack
- Double-click the generated
mcp-elasticsearch.dxt
file - Click "Install" when prompted
- Restart Claude Desktop
That's it! Now you can chat with your logs.
You: "Find unique public IPs for ingress traffic in the last 5 minutes"

The extension connects to localhost:9200
by default. To change this, edit the ES_HOST
in manifest.json
:
"env": {
"ES_HOST": "your-elasticsearch-host:9200"
}
For secured clusters, you can add username/password through environment variables.
- Elasticsearch 7.x or 8.x (tested with v8)
- Python 3.8+
- Claude Desktop (latest version)
- Node.js (for building the extension)
Extension won't install?
- Make sure you have the latest Claude Desktop
- Try removing old extensions first
Connection errors?
- Check if Elasticsearch is running
- Verify the host/port in your config
Still having issues?
# Test the connection manually
source venv/bin/activate
python -c "from elasticsearch import Elasticsearch; print('Connected:', Elasticsearch(['localhost:9200']).ping())"
The MCP server gives Claude these tools:
search_elasticsearch_logs
- Basic log searchinganalyze_error_patterns
- Find and categorize errorsanalyze_performance_issues
- Detect slow operationsget_cluster_health
- Monitor Elasticsearch healthanalyze_index_performance
- Optimize index performance
Use natural language for time ranges:
- "last 5 minutes", "1 hour", "2 days", "1 week"
- Or shortcuts like "5m", "1h", "2d", "1w"
MIT - use it however you want.
Ready to chat with your logs? Install the extension and start asking Claude questions about your Elasticsearch data!