# QStash MCP for AI Agents AI Agent Connect

> QStash (Serverless Message Queue) MCP lets you manage webhooks, background tasks, and message queues via Upstash. Send messages with custom delays, handle retries, and manage FIFO queues directly through your AI client. It makes it easy to orchestrate complex messaging workflows without switching tabs or manual configuration. You can handle DLQs and monitor flow control keys using natural language.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_qe2toOwnITMr2o4qUgpUtwgjBB41l4nVpwOjAbvw/ai-agent-connect
- **Tags:** message-queue, serverless, webhooks, upstash, qstash, background-jobs

## Description

Connect your Upstash QStash account to your AI agent to handle messaging and background tasks using natural language. Usually, managing these workflows means jumping between your code editor and a dashboard to manually configure queues, set up cron jobs, and check why certain webhooks failed. This Connector changes that by letting you do it all from your chat interface. You can have your agent create new queues, schedule recurring jobs, or dig into the Dead Letter Queue to see why a specific task didn't go through. It handles the heavy lifting of your messaging infrastructure so you can stay focused on your actual code. If you're looking for a way to manage these workflows without the friction of manual configuration, this is a solid addition to your toolkit on Vinkius. It gives you a direct line of command to your messaging architecture where you can adjust limits, pause tasks, and monitor logs in real-time without ever leaving your workspace.

## Tools

### resume_queue
Resume a queue that was previously paused. Use this to restart a task line that was put on hold.

### get_schedule
Get the details of a specific schedule. Use this to check when a cron job will next run.

### list_flow_control_keys
List all of your flow control keys. Use this to see all your rate limits and configurations.

### list_url_groups
List all your URL Groups. This helps you manage all your webhook destinations easily.

### remove_endpoints
Remove endpoints from a specific URL Group. Use this to update your webhook destinations without creating new groups.

### reset_flow_control_rate
Reset the rate limit for a specific flow control key. Use this to clear a throttled limit manually.

### resume_flow_control
Resume a flow control key that was previously paused. Use this to turn traffic back on for a service.

### resume_schedule
Resume a schedule that was previously paused. Use this to restart a recurring job.

### retry_dlq_message
Trigger a retry for a message in the Dead Letter Queue. Use this to re-run a failed task after fixing the issue.

### unpin_flow_control
Unpin a configuration for a flow control key. Use this to allow for dynamic limit changes.

### upsert_queue
Create a new queue or update an existing one. Use this to manage your task lines and their settings.

### bulk_cancel_messages
Cancel multiple messages at once based on specific filters. This is great for stopping a batch of tasks quickly.

### cancel_message
Stop a pending message from being delivered to its destination. Use this when a user cancels an action in your app.

### delete_dlq_message
Remove a specific message from the Dead Letter Queue. This helps keep your failed task list clean and organized.

### delete_queue
Delete an existing queue from your QStash account. Use this to clean up old messaging infrastructure you no longer need.

### delete_schedule
Remove a scheduled cron job from the system. This is useful for deleting old recurring tasks from your account.

### delete_url_group
Delete a specific URL Group or Topic. Use this to remove old webhook destinations from your configuration.

### enqueue_message
Add a message to a queue for FIFO processing or controlled parallelism. This ensures your tasks run in the correct order.

### get_dlq_message
Get the specific details of a message in the Dead Letter Queue. Use this to figure out exactly why a specific task failed.

### get_flow_control_key
Retrieve details for a specific flow control key. This helps you see your current rate limits and usage.

### get_global_parallelism
View the current global parallelism configuration. Use this to check your overall system capacity and limits.

### get_keys
Get your QStash signing keys. This is for managing your security credentials and authentication.

### get_message
See details for a message that is currently in flight or retrying. Use this to track the status of active tasks.

### get_queue
Get the details of a specific queue. This shows you the current status of your task lines.

### get_url_group
Get the details of a specific URL Group. This shows you where your webhooks are currently pointing.

### list_dlq
List all messages currently sitting in the Dead Letter Queue. This gives you a bird's eye view of all failed tasks.

### list_logs
Retrieve your QStash logs and events. Use this to debug your messaging history and find errors.

### list_queues
List all of your active queues. This helps you see what's running and what's paused at a glance.

### list_schedules
List all scheduled cron jobs. Use this to see all your recurring tasks in one place.

### pause_flow_control
Pause a specific flow control key. Use this to stop traffic to a specific service during maintenance.

### pause_queue
Pause a queue to stop it from processing messages. Use this to put a specific task line on hold.

### pause_schedule
Pause a specific schedule. Use this to stop a recurring job without deleting it from your account.

### pin_flow_control
Pin a configuration for a flow control key. Use this to lock in your desired rate limits.

### publish_message
Publish a message to a destination URL or URL Group. This is how you send webhooks or start background tasks.

### upsert_url_group
Create or update a URL Group. Use this to manage your webhook destinations and topics.

### batch_messages
Send multiple messages in a single request to save on overhead. Use this for high-volume messaging to save costs.

### bulk_delete_dlq
Delete every message currently in the Dead Letter Queue. Use this to clear out old failures in one go.

### bulk_retry_dlq
Retry every message currently in the Dead Letter Queue. Use this to re-run all failed tasks at once.

## Prompt Examples

**Prompt:** 
```
I need to send a webhook to my analytics endpoint but I want it to wait for about 10 minutes.
```

**Response:** 
```
I've scheduled that webhook for you. It's set to hit your analytics endpoint in 10 minutes. 

**Details:**
- **Destination:** `https://analytics.example.com/webhook`
- **Delay:** 10 minutes
- **Status:** Scheduled
- **Message ID:** `msg_7721`
```

**Prompt:** 
```
Can you show me all the queues I have and tell me which ones are currently paused?
```

**Response:** 
```
Here are your current QStash queues:

| Queue Name | Status | Parallelism |
| :--- | :--- | :--- |
| `image-proc` | **Active** | 5 |
| `email-bulk` | **Paused** | 2 |
| `data-sync` | **Active** | 10 |

The `email-bulk` queue is currently paused.
```

**Prompt:** 
```
Something failed in the background. Can you check the Dead Letter Queue and tell me what happened to the last message?
```

**Response:** 
```
I've checked the Dead Letter Queue. Here is the last failed message:

- **Message ID:** `msg_992`
- **Error:** `504 Gateway Timeout`
- **Retries:** 3
- **Last Attempt:** 2 minutes ago

Would you like me to retry this message for you?
```

## Capabilities

### Send messages with custom delays
Schedule webhooks or tasks to fire at a specific time in the future.

### Manage FIFO queues with parallelism limits
Control the order and volume of your background tasks to protect your backend.

### Schedule recurring cron jobs
Create and manage automated background tasks that run on a regular schedule.

### Retry failed messages from the DLQ
Inspect and re-run tasks that failed to deliver to ensure no data is lost.

### Adjust rate limits and flow control
Monitor and modify traffic limits to keep your downstream services stable.

### Monitor message statuses in real-time
Track the progress of messages currently in flight or being retried.

## Use Cases

### Delaying a webhook
A developer needs to send a signup webhook but wants it to wait for 30 minutes. They ask the agent to publish the message with a delay.

### Handling a traffic spike
A DevOps engineer sees a traffic spike and asks the agent to check the flow control keys and pause a specific queue.

### Clearing a stuck queue
A backend dev wants to see why a batch export is stuck. They ask the agent to list the queues and pause the one with errors.

### Cleaning up old tasks
A system architect needs to clear out old failed tasks. They ask the agent to bulk delete everything in the Dead Letter Queue.

## Benefits

- Handle DLQs without the headache of manual log digging by using list_dlq and retry_dlq_message.
- Control your traffic spikes with list_flow_control_keys and pause_flow_control to keep your backend stable.
- Set up complex cron jobs in seconds using list_schedules and upsert_schedule instead of writing boilerplate.
- Manage your messaging infrastructure from your editor with list_queues and upsert_queue.
- Reduce message loss by using publish_message with built-in retries and deduplication logic.
- Batch your requests to save on costs and overhead using batch_messages.

## How It Works

The bottom line is you get a way to control your entire messaging infrastructure using plain English.

1. Connect your Upstash QStash token to your AI client.
2. Describe the task, like 'Create a queue for image processing with a limit of 5 concurrent jobs.'
3. The agent executes the command and confirms the queue or message is ready.

## Frequently Asked Questions

**What is the QStash MCP for?**
It lets your AI agent manage your Upstash QStash account. You can schedule jobs, send webhooks, and manage queues using natural language.

**Can I use it to schedule cron jobs?**
Yes. You can ask your agent to create, list, or pause recurring schedules without touching the dashboard.

**How does it help with failed messages?**
It gives your agent access to the Dead Letter Queue. You can ask it to list failed tasks and retry them automatically.

**Can it handle rate limits?**
Yes. It can monitor your flow control keys and adjust parallelism to make sure your backend doesn't get overwhelmed.

**Is this for sending emails?**
No, it's for the messaging infrastructure. It sends the webhooks or tasks to your services, but it doesn't send the actual emails itself.

**Can I batch multiple messages?**
Yes, you can ask your agent to send multiple messages in one go to improve efficiency.

**How can I schedule a message to be sent later?**
Use the `publish_message` tool and provide the `delay` parameter (e.g., '10m' for 10 minutes) or a `not_before` Unix timestamp.

**What happens if a message fails all retry attempts?**
The message is moved to the Dead Letter Queue (DLQ). You can use `list_dlq` to find it and `retry_dlq_message` to attempt delivery again.

**Can I manage recurring tasks like cron jobs?**
Yes! You can use `list_schedules` to see existing ones, and `pause_schedule` or `resume_schedule` to control them.