Labsco
ElliotPadfield logo

Hatchet MCP

โ˜… 1

from ElliotPadfield

MCP server for Hatchet - let AI agents observe and operate your workflows: runs, logs, workers, metrics, plus trigger/cancel/replay

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

hatchet-mcp

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.

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

pnpm install
pnpm test    # vitest
pnpm 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.