
Kibana Mcp
io.github.mshegolev由 GitHub 账号 mshegolev 发布v0.1.1更新于 Oct 25, 2026
Kibana/Elasticsearch MCP — log search, aggregations, index discovery, dashboards.
概览
面向 Kibana 与 Elasticsearch 的只读 MCP 服务器,让助手搜索日志、执行聚合、列出索引并浏览仪表板。
- 可以做什么
- 列出索引及其健康状态、文档数和大小,可按模式过滤。在指定索引中按全文查询、时间范围、排序和结果数量搜索日志。按字段对日志聚合,支持计数、平均值、求和、最小值和最大值指标。列出已保存的仪表板,支持搜索和分页,并获取单个仪表板及其面板明细。结果同时以结构化 JSON 和 markdown 文本返回。
- 适用场景
- 适合助手在排查问题或复盘故障时检索日志、按级别或服务统计错误、确认有哪些索引,或查找 Kibana 仪表板,无需打开 Kibana 界面。
- 运行要求
- 以本地 Python 包运行(pip install kibana-mcp 或 uvx kibana-mcp),也可用 Docker 镜像。必须设置 KIBANA_URL;可选 ELASTICSEARCH_URL 直连 Elasticsearch,否则请求经 Kibana Console 代理转发。认证使用 KIBANA_API_KEY,或 KIBANA_USERNAME 加 KIBANA_PASSWORD,也可匿名访问。自签名证书可将 KIBANA_SSL_VERIFY 设为 false。需要能访问 Kibana 或 Elasticsearch 主机的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Kibana Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
kibana-mcp
[PyPI version] [Python 3.10+] [License: MIT] [Tests]
MCP server for Kibana / Elasticsearch — log search, aggregations, index discovery, and dashboard browsing via Claude and any MCP-compatible agent.
Why another Kibana MCP?
Existing integrations require a running Kibana instance with browser-level credentials and often wrap the Kibana UI rather than the stable REST APIs. This server:
- Hits Elasticsearch REST API directly for log queries (faster, stable across Kibana UI changes)
- Falls back to the Kibana Console proxy when no direct ES URL is configured (zero extra firewall rules)
- Supports ApiKey auth (best for agents) as well as Basic auth and anonymous access
- Returns both structured JSON (
outputSchema) and markdown text so it works with any MCP client - Is read-only — all tools carry
readOnlyHint: true, no data is modified
Tools
Installation
Or run directly with uvx:
Configuration
Environment Variables
Auth priority: ApiKey > Basic > anonymous.
Copy .env.example to .env and fill in your values.
MCP Client Configuration (Claude Desktop / claude.app)
Or with direct ES access for better performance:
Docker
Usage Examples
Log Search
→ kibana_search_logs(index="logs-*", query="level:ERROR AND service:api", size=50, time_from="2026-04-18T09:00:00Z")
→ kibana_search_logs(index="nginx-*", query="status:500", sort_order="asc", size=100)
Aggregations
→ kibana_aggregate_logs(index="logs-*", group_by="level", time_from="2026-04-18T09:00:00Z")
→ kibana_aggregate_logs(index="logs-*", group_by="service.keyword", metric="avg", metric_field="response_time_ms")
Index Discovery
→ kibana_list_indices()
→ kibana_list_indices(pattern="filebeat-*")
Dashboards
→ kibana_list_dashboards(search="infrastructure")
→ kibana_get_dashboard(dashboard_id="<id from list_dashboards>")
Performance Characteristics
- Log search (
kibana_search_logs): typically 50-500ms with direct ES URL; add 100-200ms when routing through Kibana Console proxy - Aggregations (
kibana_aggregate_logs):size:0queries — no hits transferred, usually 10-100ms - Index listing: single
_cat/indicescall, O(index_count) response, typically <100ms - Dashboard APIs: Kibana Saved Objects API, typically 50-200ms; latency is Kibana-side, not network
- Set
ELASTICSEARCH_URLdirectly if your agent does frequent log searches — eliminates the proxy overhead
Development
License
MIT — see LICENSE.
来源:README.md,提交 b1c596c
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分