MCP Server for Kibana log querying with automatic authentication
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"kibana-mcp-server","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# Kibana MCP Server 🔍 **Kibana 日志查询 MCP Server** - 提供自动认证、会话管理和多种日志查询工具 ## 功能特性 ✅ **自动认证管理** - 自动根据 `KIBANA_USERNAME` 和 `KIBANA_PASSWORD` 环境变量登录 - 自动获取并管理 `sid` cookie - 会话过期自动续期 - 401 错误透明处理并重新登录 ✅ **丰富的查询工具** - 日志搜索(关键词查询 + DSL 查询) - 聚合统计(按服务、按时间) - 错误日志快速搜索 - 原始 Elasticsearch DSL 查询 ## 安装 ```bash # 1. 安装 Python 依赖 pip install -r requirements.txt # 或使用 uv (推荐) uv pip install -r requirements.txt ``` ## 运行方式 (推荐使用 uvx) 你可以直接使用 `uvx` 从本地目录运行: ```bash uvx --from /tmp/kibana-mcp-server kibana-mcp-server ``` ## 配置 MCP ### Claude Desktop / OpenCode 配置 ```json { "mcpServers": { "kibana": { "command": "uvx", "args": [ "--from", "/tmp/kibana-mcp-server", "kibana-mcp-server" ], "env": { "KIBANA_URL": "https://logs.example.com", "KIBANA_VERSION": "8.17.1", "KIBANA_USERNAME": "your_username", "KIBANA_PASSWORD": "your_password" } } } } ``` --- ### 1. `kibana_search_logs` 搜索日志(支持关键词搜索和完整 DSL 查询) **参数:** - `query` - 搜索关键词或完整 Elasticsearch DSL JSON - `time_range` - 时间范围,默认 "now-1h" - `size` - 返回数量,默认 20 - `index_pattern` - 索引模式,默认 "logstash-*" - `fields` - 返回字段列表 **示例 1: 关键词搜索** ```json { "query": "user_id", "time_range": "now-30m", "size": 10 } ``` **示例 2: DSL 查询** ```json { "query": "{\"query\":{\"bool\":{\"must\":[{\"match\":{\"kubernetes.container_name\":\"api-server\"}}]}}}", "time_range": "now-1h", "size": 50 } ``` --- ### 3. `kibana_aggregate_logs` 聚合统计日志 **参数:** - `aggregation_type` - 聚合类型: "by_service" | "by_time" | "custom" - `time_range` - 时间范围,默认 "now-1h" - `filter` - 可选过滤条件(DSL JSON) - `custom_aggregation` - 自定义聚合(仅 custom 类型) - `index_pattern` - 索引模式 **示例 1: 按服务统计** ```json { "aggregation_type": "by_service", "time_range": "now-24h" } ``` **示例 2: 按时间统计** ```json { "aggregation_type": "by_time", "time_range": "now-6h" } ``` --- ### 4. `kibana_get_latest_logs` 快速获取最新日志 **参数:** - `service` - 服务名称(可选) - `size` - 返回数量,默认 10 - `i…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.