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 可覆寫 API 位址與租戶,適用於自架執行個體。
安裝前請注意
此權杖擁有整個租戶的存取權限,應視為機密,切勿提交到版本控制。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 分