# Trigger.dev MCP for AI Agents AI Agent Connect

> Trigger.dev MCP lets you manage background jobs, monitor execution runs, and handle task scheduling directly from your AI agent. You can trigger single tasks, fire off batches of up to 1,000 jobs, or manage environment variables without switching tabs. It's built to help you keep production workflows running smoothly by giving your agent direct control over the Trigger.dev lifecycle.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_DiUWSJJpaOcItA1IYDF4PWPoPmppnbeSDfcRQ8O3/ai-agent-connect
- **Tags:** background-jobs, task-scheduling, workflow-automation, serverless, monitoring

## Description

Managing long-running background jobs usually means jumping between your code editor, a monitoring dashboard, and your terminal to check why something failed or to manually kick off a retry. This Connector changes that by bringing the entire Trigger.dev control plane into your AI client. Instead of hunting for specific run IDs or manually updating environment variables in a web console, you just tell your agent what to do. You can ask it to list failed runs for a specific task, replay a job that hit a timeout, or batch trigger a massive set of updates. It's about moving from monitoring to acting without the context switch. This means you don't have to keep multiple browser tabs open just to see if your data migration finished or to change a production secret. Because it's part of the Vinkius catalog, you can plug it in and immediately start managing your production workflows through natural language. It handles the heavy lifting of interacting with the Trigger.dev API so you can focus on shipping features rather than babysitting queues. Whether you're debugging a production bug at midnight or setting up a recurring cleanup job, your agent becomes a direct interface for your background infrastructure.

## Tools

### create_env_var
create_env_var adds a new environment variable to your Trigger.dev project. This lets you manage secrets and configs without a web UI.

### replay_run
replay_run re-runs a job that failed previously. Use this to fix errors without having to manually trigger the task again.

### batch_trigger_tasks
batch_trigger_tasks lets you fire off a large group of tasks in one go. This helps when you need to update many records at once without hitting rate limits.

### cancel_run
cancel_run stops a job that's currently running. Use this if a process is stuck or no longer needed.

### complete_waitpoint
complete_waitpoint manually finishes a task that's waiting for an external signal. This is great for multi-step workflows that need human input.

### create_batch
create_batch starts a new group of tasks to be processed together. It helps organize large-scale data operations into manageable phases.

### create_schedule
create_schedule sets up a recurring cron job for your tasks. Use this to automate daily or hourly maintenance jobs.

### create_waitpoint_token
create_waitpoint_token generates a unique token for a task that needs to pause. It allows you to resume a job whenever you're ready.

### delete_env_var
delete_env_var removes an environment variable from your project. Use this to clean up old configuration keys.

### get_batch_results
get_batch_results shows the final output of a completed batch of tasks. This is perfect for verifying large data migrations.

### get_run
get_run looks up the details of a specific job execution. Use it to see exactly what went wrong during a failure.

### list_env_vars
list_env_vars shows all the environment variables currently set in your project. This helps you quickly check your configuration.

### list_runs
list_runs shows a history of all your recent task executions. Use it to monitor the health of your background workers.

### list_schedules
list_schedules shows all the recurring jobs you've created. This helps you keep track of your automated workflows.

### override_queue_concurrency
override_queue_concurrency changes how many jobs run at once in a specific queue. Use this to prevent overloading your database.

### pause_resume_queue
pause_resume_queue temporarily stops or starts a queue of jobs. This is useful for maintenance windows or handling traffic spikes.

### trigger_task
trigger_task starts a single background job by its name. This is the most common way to kick off a new workflow.

### update_env_var
update_env_var changes the value of an existing environment variable. Use this to flip feature flags or update API keys.

### update_run_metadata
update_run_metadata adds extra info to a running job for better tracking. This helps you see custom progress markers in your dashboard.

## Prompt Examples

**Prompt:** 
```
Show me the status of the 'sync-data' job from 10 minutes ago.
```

**Response:** 
```
I've checked the logs for 'sync-data'. The most recent run (ID: run_9921) finished successfully at 10:45 AM.

**Payload Summary:**
| Source | Destination | Records | Status |
| :--- | :--- | :--- | :--- |
| User_DB | Analytics_Warehouse | 450 |
| Product_Cat | Search_Index | 12 |

Would you like to see the next one?
```

**Prompt:** 
```
I need to trigger the 'send-welcome-emails' task for 50 new users.
```

**Response:** 
```
I'll start that batch for you. I'm using `batch_trigger_tasks` to process all 50 users at once. 

**Action Details:**
- **Task:** send-welcome-emails
- **Count:** 50
- **Status:** Initiated

You'll get a notification once the batch is complete.
```

**Prompt:** 
```
Can you list all the environment variables for the production project?
```

**Response:** 
```
Here are the variables currently set for your production environment:

*   **API_KEY:** `********` (Hidden)
*   **DB_URL:** `postgres://prod_db_01:5432`
*   **DEBUG:** `false`
*   **LOG_LEVEL:** `info`

Let me know if you need to update any of these.
```

## Capabilities

### Trigger batch jobs
Fire off a large group of tasks in a single request using batch_trigger_tasks.

### Replay failed executions
Retry jobs that didn't finish correctly using replay_run.

### Manage environment variables
Create, list, or update your project configurations via create_env_var and list_env_vars.

### Monitor run statuses
Check the specific status and payload of any job with get_run or list_runs.

### Schedule recurring tasks
Automate your workflows with cron schedules using create_schedule.

### Pause or resume queues
Control your queue flow to prevent overloading with pause_resume_queue.

## Use Cases

### Fixing a stuck migration
A developer asks the agent to cancel_run on a hung database update and then replay_run once the lock is cleared.

### Batching user invites
A PM asks the agent to batch_trigger_tasks to send 500 welcome emails to new signups in one request.

### Emergency queue pause
An engineer sees a spike in traffic and tells the agent to pause_resume_queue to protect the backend.

### Setting up daily cleanup
A dev asks the agent to create_schedule to run a log rotation task every night at 2 AM.

## Benefits

- Stop hunting through logs by using get_run to see exact failure reasons instantly.
- Manage your entire configuration via create_env_var and list_env_vars without leaving your editor.
- Handle massive data updates with batch_trigger_tasks to run up to 1,000 jobs at once.
- Keep your system stable by using override_queue_concurrency to prevent database overloads.
- Automate maintenance with create_schedule to set up cron jobs using natural language.
- Recover from errors quickly by using replay_run to retry failed tasks with a single command.

## How It Works

The bottom line is you get a direct command line for your background jobs inside your AI chat.

1. Connect your Trigger.dev Secret Key to the Connector.
2. Tell your AI client to perform an action like listing runs or triggering a task.
3. Get immediate confirmation and status updates directly in your chat.

## Frequently Asked Questions

**Can the Trigger.dev MCP help me see why a job failed?**
Yes, it lets you list all recent runs and get the specific error details for any failed job without leaving your chat.

**How do I use this to manage my cron jobs?**
You can describe the schedule you want in plain English, and the Connector will create the recurring task for you using the create_schedule tool.

**Can I use this to update my production secrets?**
Yes, you can ask your agent to update or list environment variables directly, which is much safer than manually editing config files.

**Is it possible to restart a job that stopped halfway?**
You can use the replay_run tool to re-execute a failed job, which saves you from having to manually trigger the whole workflow again.

**Can I use this to stop a queue from overloading my database?**
Definitely. You can tell your agent to pause a queue or override the concurrency limits to keep your database stable during high traffic.

**Does this Connector work for batching multiple tasks?**
Yes, it supports triggering up to 1,000 tasks in a single request, which is perfect for large data migrations or bulk updates.

**Can I trigger multiple background tasks at once?**
Yes! You can use the `batch_trigger_tasks` tool to trigger up to 1,000 tasks in a single batch request, which is highly efficient for high-volume workflows.

**How do I check the output or error of a specific job run?**
Use the `get_run` tool with the specific Run ID. It will return the full status, payload, output, and any attempt details or error logs associated with that run.

**Can I schedule a task to run automatically using a cron expression?**
Absolutely. Use the `create_schedule` tool to define a task identifier, a cron expression (e.g., '0 0 * * *'), and a deduplication key to automate recurring background jobs.