# Huginn MCP MCP

> Huginn MCP lets you control your private, self-hosted automation cloud directly from any AI agent. It's an open alternative to services like IFTTT or Zapier, giving you full API access to manage agents, trigger webhooks, and orchestrate complex event scenarios without relying on external SaaS platforms.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** workflow-automation, webhooks, self-hosted, event-driven, task-scheduling, integration

## Description

This MCP connects your local Huginn instance—your private automation cloud—to any AI agent. Instead of building complicated webhook chains in a separate dashboard, you talk to your agent and tell it exactly what needs doing with your workflows. You gain granular control over multi-step scenarios: need to check if an event happened? Call the relevant tools. Need to start a whole process manually? Run an agent directly. It's about getting visibility into every piece of data flowing through your system, letting you inspect payloads and re-emit events for debugging or reprocessing. When you connect this MCP via Vinkius, your AI client treats your entire automation engine like just another set of tools—easy to talk to, easy to control. This lets DevOps teams move complex orchestration logic out of the UI and right into natural conversation.

## Tools

### list_events
Retrieves a list of recent events that happened within the Huginn system.

### create_agent
Creates a brand new agent definition inside your Huginn environment.

### delete_agent
Permanently removes an existing automation agent from the system.

### export_scenario
Generates a JSON file containing all settings for a specified workflow scenario.

### get_agent
Fetches specific details and metadata for one particular agent.

### get_event
Retrieves the full payload and detail history for a single event ID.

### import_scenario
Loads and recreates an entire workflow scenario using a provided JSON configuration file.

### list_agents
Provides a comprehensive list of all agents currently configured in the system.

### list_scenarios
Lists all available workflow scenarios that can be executed or managed.

### reemit_event
Takes an existing event and forces the system to process it again, useful for retrying failed steps.

### run_agent
Immediately runs a specified agent, initiating its full automation sequence.

### trigger_webhook
Sends custom JSON data to an agent configured as a webhook endpoint.

### update_agent
Modifies the settings or definition of an existing automation agent.

## Prompt Examples

**Prompt:** 
```
List all my Huginn agents and their current status.
```

**Response:** 
```
I've retrieved your agents. You have 3 active agents: 'Weather Notifier' (ID: 12), 'eBay Scraper' (ID: 15), and 'Slack Webhook' (ID: 20). All are currently in good standing.
```

**Prompt:** 
```
Trigger the webhook agent 42 with secret 'top-secret' and payload {"action": "deploy"}.
```

**Response:** 
```
Successfully triggered Webhook Agent 42. The payload has been sent and the workflow is now processing.
```

**Prompt:** 
```
Export the scenario with ID 5 so I can back it up.
```

**Response:** 
```
I have exported the scenario 'Home Automation' (ID: 5). Here is the JSON configuration containing all associated agents and settings.
```

## Capabilities

### Monitor System Events
Check recent system activity, view detailed event payloads, and manually re-emit events for debugging.

### Manage Agents and Scenarios
Create, update, delete, or list all automation agents and entire workflow scenarios using natural language commands.

### Execute Workflows
Manually trigger specific agents to run their full logic, or send arbitrary data via webhooks to kick off complex backend tasks.

### Audit Configuration
List all active scenarios and export the entire configuration as JSON for backups or migrations.

## Use Cases

### Debugging a Failed Scraper Run
A data enthusiast sees an alert that the 'eBay Scraper' failed. Instead of logging into Huginn, they simply ask their agent to `get_event` for the last 5 minutes, getting the full payload immediately to diagnose whether the failure was due to bad credentials or a structural change in the target site.

### Testing New Workflow Logic
A DevOps engineer wants to test a new agent without setting up a dummy trigger. They use `run_agent` directly, pointing it at the 'Weather Notifier' agent, and watch the output in their chat window, confirming the logic works before committing any changes.

### Automated System Backup
The ops team needs to back up all current workflow definitions. They ask the agent to `list_scenarios` first, then use `export_scenario` on the critical 'User Onboarding' sequence and get the JSON file for Git storage.

### Initiating a Manual Process
A backend process needs manual initiation. Instead of calling an external API endpoint directly, they ask their agent to `trigger_webhook` with a specific payload telling the system: 'deploy' and the necessary credentials.

## Benefits

- Run agents on demand: Instead of logging into a dashboard, you can tell your agent to use the `run_agent` tool, kicking off complex processes with a single chat command. This is huge for testing and recovery.
- Full visibility into data flow: Need to know why something broke? Use `list_events` or `get_event` to pull the raw payload data directly into your chat context. You don't have to hunt through logs.
- Build reliable pipelines: If a step fails, you can use `reemit_event` and pass the updated event ID back in the prompt, forcing a retry without touching any dashboards.
- Manage configurations easily: Use tools like `list_scenarios` and `export_scenario` to get JSON backups of entire workflow groups. It simplifies migrating setups between environments.
- Control specialized tasks: You can use `trigger_webhook` with custom data, which is perfect for connecting your AI agent to legacy backend systems that expect a specific JSON payload.

## How It Works

The bottom line is you bypass the graphical UI entirely, managing all automation logic through simple conversation with your agent.

1. Subscribe to this MCP in Vinkius, providing your Huginn Base URL and API Token.
2. Reference the necessary agent IDs or scenario names within a prompt to your AI client.
3. Your agent executes the required action (e.g., triggering an agent run) and returns the result or status code.

## Frequently Asked Questions

**How do I check if my agents are running properly using list_agents?**
You use the `list_agents` tool to get a summary of all configured agents and their current status. This gives you an immediate overview without having to drill into every single agent's settings.

**What is the difference between list_events and get_event?**
The `list_events` tool shows a chronological feed of recent system activities. If you need the deep, full payload details for one specific instance, use `get_event` with the unique event ID.

**Can I trigger an agent run without knowing its name?**
No, you must first use `list_agents` to identify the correct agent ID or name. You then pass that specific identifier into the `run_agent` tool for execution.

**How do I update a scenario after it has been exported?**
You modify the JSON file locally, and then use the `import_scenario` tool to load the updated definition back into Huginn. This overwrites the old settings cleanly.

**When I use `update_agent`, what kind of security settings can I change?**
You manage credentials and access permissions when using `update_agent`. This lets you swap out API keys or adjust roles, keeping your automation secure without touching the agent's core logic.

**When I use `get_event`, what detailed information do I find about a workflow that failed?**
The event payload includes full metadata and specific error logs. This lets you see the exact stack trace or data failure point, so you know precisely where in the process it broke.

**If I export a scenario using `export_scenario`, can I move that entire group of related agents to another system?**
The exported JSON captures all associated agent definitions and settings. You then use `import_scenario` on the target instance, letting you rebuild your complex workflows quickly.

**What is the actual function of using `reemit_event`?**
Use this when source data changes or an event needs reprocessing. It sends a fresh copy of an old event, allowing downstream agents to run against updated information without manual intervention.

**How do I trigger a specific Webhook Agent with data?**
Use the `trigger_webhook` tool. You will need the `user_id`, the `agent_id`, and the `secret` defined in that agent's configuration, along with the JSON payload you want to send.

**Can I see what data my agents have collected recently?**
Yes! Use the `list_events` tool to see a list of recent activity, or `get_event` with a specific ID to see the full JSON payload of a single event.

**Is it possible to run an agent immediately without waiting for its schedule?**
Absolutely. Use the `run_agent` tool with the Agent ID to force an immediate execution of that specific agent.