Hatchet Mcp

io.github.ElliotPadfield由 GitHub 账号 ElliotPadfield 发布v0.1.1更新于 Oct 24, 2026

Observe and operate Hatchet workflows from an AI agent — runs, logs, trigger, cancel, replay.

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手查看并操作 Hatchet 工作流:运行记录、日志、worker、指标,以及触发、取消和重放。

可以做什么
  • 查看解析出的租户与服务器地址,并确认令牌可用
  • 列出工作流定义、工作流运行和 worker,并读取单次运行的状态、任务与错误
  • 按任务外部 ID 获取日志行,并查看队列健康指标
  • 按名称和 JSON 输入载荷触发新的工作流运行
  • 按外部 ID 取消或重放一个或多个运行或任务
适用场景
适合在使用 Hatchet 工作流时,让助手排查失败、查看运行日志和队列健康,或在不打开控制台的情况下启动、取消和重试运行。
运行要求
通过 stdio 在本地运行,通常用 npx 启动 hatchet-mcp npm 包,因此需要 Node.js。需要在 HATCHET_CLIENT_TOKEN 中提供 Hatchet API 令牌,可从 Hatchet 控制台获取;该 JWT 已包含服务器地址和租户。可选 HATCHET_API_BASE 和 HATCHET_TENANT_ID 用于覆盖接口地址和租户,适用于自托管实例。
安装前请注意
该令牌拥有整个租户的访问权限,应视为机密,切勿提交到代码仓库。trigger_workflow、cancel_runs 和 replay_runs 会改动线上状态并影响真实运行,使用前应确认。令牌与工作流数据会发送到所配置的 Hatchet 实例。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hatchet Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

hatchet-mcp

[CI] [npm version] [license: MIT]

An MCP server that lets AI agents observe and operate Hatchet workflows — status, runs, logs, workers, and metrics, plus trigger / cancel / replay.

Why: Hatchet has a great API but no MCP. This wraps it so agents (Claude Code / Desktop, etc.) can see and act on workflow state.

Install

Add this to your Claude Code / Claude Desktop MCP config:

json
{  "mcpServers": {    "hatchet": {      "command": "npx",      "args": ["-y", "hatchet-mcp"],      "env": { "HATCHET_CLIENT_TOKEN": "<your-hatchet-api-token>" }    }  }}

Get the token from the Hatchet dashboard → API tokens. The token is a JWT that encodes the server URL and tenant, so it's the only required setting.

Configuration

VariableRequiredDescription
HATCHET_CLIENT_TOKENYesHatchet API token (JWT). Encodes the server URL + tenant, so it's normally all you need.
HATCHET_API_BASENoOverride the API base URL. Self-hosters can point this at any Hatchet instance.
HATCHET_TENANT_IDNoOverride the tenant id decoded from the token.

Self-hosting? Set HATCHET_API_BASE to your own Hatchet instance and it works anywhere.

Tools

Observability (read-only)

ToolDescription
whoamiShow the resolved Hatchet tenant + server URL and confirm the token works.
list_workflowsList workflow definitions for the tenant.
list_runsList workflow runs (with an optional lookback window and filters).
get_runGet the full detail of one workflow run — status, tasks, errors.
get_run_logsGet log lines for a task by its external id.
list_workersList workers and their status.
get_queue_metricsGet task/queue metrics for the tenant (queue health).

Actions (mutate live state)

ToolDescription
trigger_workflowTrigger a new workflow run by name with a JSON input payload.
cancel_runsCancel one or more runs/tasks by external id.
replay_runsReplay/retry one or more runs/tasks by external id.

Safety

The read tools (whoami, list_workflows, list_runs, get_run, get_run_logs, list_workers, get_queue_metrics) are non-destructive.

trigger_workflow, cancel_runs, and replay_runs mutate live state — their descriptions are prefixed MUTATES LIVE STATE so agents and users know they affect real runs.

The token grants full tenant access — treat it as a secret. Never commit it to source control.

Development

bash
pnpm installpnpm test    # vitestpnpm build   # tsup -> dist/index.js

TypeScript / ESM, tested with vitest.

Status

v0.1.0 — all tools verified against Hatchet Cloud; works with self-hosted instances via HATCHET_API_BASE. trigger_workflow uses the stable /workflow-runs/trigger endpoint.

来源:README.md,提交 18b34bf

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分