工作流调试监控服务

Hatchet MCP Server是一个用于调试和监控Hatchet工作流的服务,支持从Claude Code或其他MCP客户端进行操作。

  • by GJakobi
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 GJakobi/hatchet-mcp

使用说明

Hatchet MCP服务器

用于调试和监控的MCP服务器 斧头 Claude Code或其他MCP客户的作业。

安装

git clone https://github.com/GJakobi/hatchet-mcp.git
cd hatchet-mcp
uv sync

配置

添加到您的 .mcp.json (克劳德代码)或MCP客户端配置:

{
  "mcpServers": {
    "hatchet": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/hatchet-mcp", "python", "-m", "hatchet_mcp.server"],
      "env": {
        "HATCHET_CLIENT_TOKEN": "your-hatchet-token"
      }
    }
  }
}

可用工具

工具 说明
list_workflows 列出所有已注册的Hatchet工作流
list_runs 列出使用过滤器运行的工作流(工作流名称、状态、since_hours、限制)
get_run_status 按ID获取特定运行的状态
get_run_result 获取已完成运行的输出/结果
get_queue_metrics 按状态(排队、正在运行、已完成、失败)获取作业计数
search_runs 按元数据(例如audit_id、patient_id)进行搜索

示例用法

在Claude代码中配置后:

> List all Hatchet workflows
Uses: mcp__hatchet__list_workflows

> Show me runs that failed in the last 24 hours
Uses: mcp__hatchet__list_runs with status="failed"

> Find all runs for audit_id abc123
Uses: mcp__hatchet__search_runs with metadata_key="audit_id", metadata_value="abc123"

> What's the current queue depth?
Uses: mcp__hatchet__get_queue_metrics

状态值

  • queued -等待处理
  • running -当前正在执行
  • completed -已成功完成
  • failed -已完成,但有错误
  • cancelled -手动取消

许可证

麻省理工学院