elasticsearch-logs
Provides read-only tools for querying and analyzing logs in Elasticsearch, including connection checks, index discovery, field inspection, log search, context retrieval, and log aggregation with time trends.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@elasticsearch-logssearch for NullPointerException in app-logs-* over the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Elasticsearch 日志查询 MCP
这是一个只读的 Elasticsearch MCP 服务,适合让 Codex、Claude Desktop 等 MCP 客户端辅助排查日志。
功能
check_connection:检查 ES 连接和版本list_indices:发现日志索引get_index_fields:查看字段及类型search_logs:按关键词、时间范围和精确字段过滤日志get_log_context:查看某条异常时间点前后的日志aggregate_logs:按日志级别、服务、主机等字段统计,并可生成时间趋势
所有工具均为只读操作。单次最多返回 200 条日志。
Related MCP server: quickwit-mcp
安装与启动
python -m pip install -r requirements.txt
python es_mcp_server.py默认连接信息与原 testes.py 一致。生产使用建议通过环境变量覆盖:
$env:ES_URL = "http://127.0.0.1:9200"
$env:ES_USERNAME = "elastic"
$env:ES_PASSWORD = "your-password"
python es_mcp_server.pyMCP 客户端配置
将下面配置加入客户端的 MCP servers 配置中,并把路径改成当前机器上的实际绝对路径:
{
"mcpServers": {
"elasticsearch-logs": {
"command": "python",
"args": ["D:\\pyProject\\esmcp\\es_mcp_server.py"],
"env": {
"ES_URL": "http://192.168.25.230:9200",
"ES_USERNAME": "elastic",
"ES_PASSWORD": "your-password"
}
}
}
}使用示例
“列出最近的日志索引”
“在
app-logs-*中查询最近一小时包含 NullPointerException 的日志”“筛选
service.name.keyword=order-service且log.level.keyword=ERROR的日志”“查看 2026-07-31T10:30:00+08:00 前后两分钟的日志”
“统计最近 24 小时各日志级别数量,并按 1 小时展示趋势”
字段名称以实际 mapping 为准;首次使用建议先调用 get_index_fields。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceA read-only MCP server for Elasticsearch 7.10 clusters, providing tools for cluster info, health, index listing, and Query DSL search with Google OAuth and Bearer token authentication.Last updated27MIT
- Alicense-qualityBmaintenanceA read-only MCP server that exposes Quickwit log search and aggregations to LLM clients, enabling natural language log investigation.Last updatedApache 2.0
- Alicense-qualityDmaintenanceA read-only MCP server that gives AI assistants natural language access to Elasticsearch/Kibana logs for querying and analysis.Last updatedMIT
- Alicense-qualityDmaintenanceRead-only MCP server for exploring and searching OpenSearch clusters, enabling log analysis, index exploration, and query execution.Last updatedMIT
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
Federated commerce search across independent WooCommerce merchants. Keyless, read-only MCP server.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ws135y/dp-esmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server