Hatchet MCP Server
# Hatchet MCP Server
MCP server for debugging and monitoring [Hatchet](https://hatchet.run) jobs from Claude Code or other MCP clients.
## Installation
```bash
git clone https://github.com/GJakobi/hatchet-mcp.git
cd hatchet-mcp
uv sync
```
## Configuration
Add to your `.mcp.json` (Claude Code) or MCP client config:
```json
{
"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"
}
}
}
}
```
## Available Tools
| Tool | Description |
|------|-------------|
| `list_workflows` | List all registered Hatchet workflows |
| `list_runs` | List workflow runs with filters (workflow_name, status, since_hours, limit) |
| `get_run_status` | Get status of a specific run by ID |
| `get_run_result` | Get the output/result of a completed run |
| `get_queue_metrics` | Get job counts by status (queued, running, completed, failed) |
| `search_runs` | Search runs by metadata (e.g., audit_id, patient_id) |
## Example Usage
Once configured in Claude Code:
```
> 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
```
## Status Values
- `queued` - Waiting to be processed
- `running` - Currently executing
- `completed` - Finished successfully
- `failed` - Finished with error
- `cancelled` - Manually cancelled
## License
MIT
TDQS
Scored across 6 tools
Most tools have distinct purposes focused on different aspects of workflow management (metrics, runs, workflows), but get_run_result and get_run_status could potentially overlap in some use cases since both retrieve information about specific runs. The descriptions help clarify that get_run_result focuses on output data while get_run_status focuses on current status, but an agent might still need to carefully choose between them.
All tools follow a consistent verb_noun pattern with clear, descriptive names. The naming convention is uniform throughout: get_queue_metrics, get_run_result, get_run_status, list_runs, list_workflows, and search_runs. This consistency makes it easy for agents to understand and predict tool functionality.
Six tools is an appropriate number for a workflow management server. This provides comprehensive coverage without being overwhelming. The tools cover metrics retrieval, run status checking, run listing/searching, and workflow listing - a well-scoped set that addresses the core needs of interacting with a workflow system.
The tool set provides strong read/search capabilities for workflows and runs, with good coverage for querying metrics, status, results, and metadata. Minor gaps exist in write operations (no tools for creating/triggering workflows or managing runs), but for a monitoring/query-focused server, the surface is reasonably complete for its apparent purpose.