Token导航 LogoToken导航TokenDH.com
Humio MCP logo
运维云端stdio官方级别未说明来源级核验

Humio MCP

MCP Server

HumioMCP是一个用于查询Humio/LogScale仪表板和执行搜索查询的服务,支持多集群配置和多种时间格式。

工具数

3

提示词数

0

GitHub Stars

0

资源数

0
日志分析PythonClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

weihong-xu-hpe

提供方

weihong-xu-hpe

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run mcp dev src/humio_mcp/server.py

详细介绍

HumioMCP

MCP服务器,用于查询Humio/LogScale仪表板和执行搜索查询。

建于 FastMCP python

特性

  • list_dashboards --在Humio仓库/视图中列出所有仪表板,并可选择名称过滤
  • get_dashboard_查询 --从仪表板的小部件中提取所有搜索查询(带时间范围)
  • 执行搜索 --运行搜索查询并获取JSON格式的结果(默认限制:200个事件)
  • 通过TOML配置支持多集群
  • 两者相对时间(24h, 7d)以及ISO 8601(2024-01-01T00:00:00Z)支持

______________________________________________________________________

他人快速入门

选项A:一键VS代码配置(推荐)

不需要克隆。将此添加到您的VS代码中 settings.json.vscode/mcp.json:

{
  "servers": {
    "humio-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/weihong-xu-hpe/humio-mcp.git",
        "humio-mcp"
      ],
      "env": {
        "HUMIO_MCP_CONFIG": "${userHome}/.config/humio-mcp/config.toml"
      }
    }
  }
}

然后在以下位置创建配置文件 ~/.config/humio-mcp/config.toml:

default_cluster = "us-west-2"

[clusters.us-west-2]
url = "https://your-humio-url.example.com/logs"
token = "your-api-token"

就是这样-- uvx 自动处理安装和更新。

先决条件: 紫外线 必须安装(brew install uvcurl -LsSf https://astral.sh/uv/install.sh | sh)

选项B:克隆并在本地运行

git clone https://github.com/weihong-xu-hpe/humio-mcp.git
cd humio-mcp
uv sync

cp config.example.toml config.toml
# Edit config.toml with your cluster URLs and API tokens

本地克隆的VS代码配置:

{
  "servers": {
    "humio-mcp": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/HumioMCP", "mcp", "run", "src/humio_mcp/server.py"]
    }
  }
}

选项C:克劳德桌面

增添 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "humio-mcp": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/weihong-xu-hpe/humio-mcp.git",
        "humio-mcp"
      ],
      "env": {
        "HUMIO_MCP_CONFIG": "/Users/yourname/.config/humio-mcp/config.toml"
      }
    }
  }
}

______________________________________________________________________

配置

编辑 config.toml (或 ~/.config/humio-mcp/config.toml):

default_cluster = "us-west-2"

[clusters.us-west-2]
url = "https://mira-us-west-2.cloudops.ccs.arubathena.com/logs"
token = "your-api-token"

[clusters.eu-central-1]
url = "https://mira-eu-central-1.example.com/logs"
token = "another-token"

配置搜索顺序:

  1. HUMIO_MCP_CONFIG 环境变量
  2. ./config.toml
  3. ~/.config/humio-mcp/config.toml

发展

# MCP Inspector (interactive debugging)
uv run mcp dev src/humio_mcp/server.py

# Stdio mode
uv run mcp run src/humio_mcp/server.py

工具

list_dashboards

参数类型必填描述
repostr存储库/视图名称
clusterstr群集名称(配置中的默认值)
search_filterstr按名称子字符串筛选

get_dashboard_查询

参数类型必填描述
repostr存储库/视图名称
dashboard_namestr仪表板名称
集群str集群名称

执行搜索

参数类型必填描述
repostr存储库/视图名称
query_stringstrHumio搜索查询
startstrNo开始时间(默认值: 24h)
endstr结束时间(默认值: now)
集群str集群名称

目录标签

目录标签

日志分析PythonClaude本地部署多集群支持查询服务开发工具

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

3

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP