We've built an official MCP server and agent rules for Trigger.dev. The MCP server handles everything from project initialization and task triggering to deployment and debugging. We've also created agent rules to improve the quality of code generated by AI tools like Cursor and Claude.

An MCP-first vision

We believe the future of developer tools isn't dashboards — it's agents. As AI coding assistants become integral to how developers work, we're building Trigger.dev with an agent-first approach.

This means treating your AI assistant as a primary interface for managing background jobs, not just an add-on. From initializing projects to debugging production runs, everything should be accessible through natural conversation with your coding assistant.

Our MCP server and agent rules are the foundation of this vision, but they're just the beginning. Every new feature we build will consider the agent experience from day one.

Installing the MCP server and rules

Simply run the following command to install the MCP server and rules:


npx trigger.dev@latest mcp

This will launch an interactive wizard that lets you choose which AI coding tools you want to install the MCP server for and configure the installation scope.

Here's the MCP server in action

Using the MCP server

We've hand-crafted the tools we think you'll find most useful for your Trigger.dev projects. You can:

  • Add Trigger.dev to an existing project and get started with your first task
  • Search the Trigger.dev docs
  • Get information about your current tasks, like their payload schema
  • Trigger your tasks
  • Debug your runs
  • Cancel your runs
  • List your runs
  • Deploy your tasks to prod, staging or our new preview environments
  • Monitor your deploys

Authentication and dev-only tools

The MCP server is authenticated the same way as the CLI.

You can use the MCP server in "dev-only mode" to prevent the MCP server from accessing your production data, no matter how hard the prompt-injectors try. Just add the --dev-only flag to the args:


{
"mcpServers": {
"trigger": {
"command": "npx",
"args": ["trigger.dev@latest", "mcp", "--dev-only"]
}
}
}

Or just choose the "Dev Only" option when installing the MCP server via npx trigger.dev@latest mcp:

Dev Only MCP server

Using the agent rules

We've created a comprehensive set of agent rules that guide AI tools to write optimal Trigger.dev code. These rules cover:

Rule SetTokensDescription
Basic rules1,200Only the most important rules for writing basic Trigger.dev tasks
Advanced tasks3,000Comprehensive rules to help you write advanced Trigger.dev tasks
Scheduled tasks780How to write and use scheduled Trigger.dev tasks
Configuration1,900Configure your Trigger.dev project with a trigger.config.ts file
Realtime1,700How to use Realtime in your Trigger.dev tasks and your frontend

These rules work across various AI tools. You can install them using npx trigger.dev@latest install-rules, which allows you to choose which AI tools you want to install rules for and exactly which rules you want to install for each.

We currently support:

  • Cursor - Rules automatically activate when working in trigger directories
  • Claude Code - Context-aware rules plus our custom subagent
  • VSCode Copilot - Integration with GitHub Copilot chat
  • Windsurf - Codeium's AI-powered editor
  • Gemini CLI - Google's AI assistant for the command line
  • Cline - VSCode extension for AI coding assistance
  • AGENTS.md - Universal format for OpenAI Codex, Jules, OpenCode, etc.
  • Sourcegraph AMP - Code intelligence platform integration
  • Kilo - AI coding assistant
  • Ruler - Rule management tool

Depending on the AI tool you're using, the rules files may behave differently. For example, the Cursor rules will automatically be added to your agent when it works on any file inside a trigger directory. And the config rules will be used when you have added the trigger.config.ts file to your project. It works similarly for VSCode, Windsurf and Cline.

When adding rules to other agents, like the AGENTS.md clients, we will append the rules to the end of the file.

Claude Code subagent

We've also created a subagent called trigger-dev-expert for use with Claude Code. This subagent is an expert at writing well-structured Trigger.dev code. For Claude Code you can install just the subagent file if you'd like, but we've found it works best when used in conjunction with the rules above installed as well. You can install the subagent by selecting it when installing the rules:

Claude Code subagent

Using the subagent is simple, just request Claude to use the subagent in your prompt with use the trigger-dev-expert subagent, like this:


use the trigger-dev-expert agent to create a trigger.dev job that accepts a video url, processes it with ffmpeg to extract the audio, runs the audio through a text-to-speech API like openai, and then uploads both the transcription and the audio to s3

Keeping rules up to date

AI coding assistants work best with current, accurate guidance. As we ship new features and improve our APIs, outdated rules can lead to deprecated patterns or suboptimal code generation.

That's why we've built automatic update prompts directly into the CLI. When you run npx trigger.dev@latest dev, we'll let you know if newer rules are available and offer to update them with a single command.

You can also manually update anytime with npx trigger.dev@latest install-rules. The update process is smart—instead of appending duplicates like some rule systems, we cleanly replace existing rules with the latest versions, keeping your configuration files organized.

This means you'll always have access to the most up-to-date patterns, new API features, and performance optimizations as soon as we release them.

Get started today

The MCP server and agent rules represent our first major step toward an agent-first developer experience. Whether you're initializing a new project, debugging a production run, or deploying to staging, your AI assistant now has direct access to everything it needs.

Start with:


npx trigger.dev@latest mcp

to set up the MCP server, then add the agent rules with:


npx trigger.dev@latest install-rules

Both tools work together to give your AI coding assistant deep knowledge of Trigger.dev patterns and direct project access.

We'd love to hear how this changes your workflow. Share your feedback on Discord or let us know what agent capabilities you'd like to see next.

Ready to start building?

Build and deploy your first task in 3 minutes.

Get started now