Skip to Content
MCP Server

MCP Introduction

Learn how to install and configure the Trigger.dev MCP Server

What is the Trigger.dev MCP Server?

The Trigger.dev MCP (Model Context Protocol) Server enables AI assistants to interact directly with your Trigger.dev projects. It provides a comprehensive set of tools to:

  • Search Trigger.dev documentation
  • Initialize new Trigger.dev projects
  • List and manage your projects and organizations
  • Get task information and trigger task runs
  • Deploy projects to different environments
  • Monitor run details and list runs with filtering options
  • Query your data with TRQL and run built-in dashboard metrics

This page covers the CLI MCP server, which runs locally and can deploy and run your dev server.

Installation

The quickest way to get set up is the interactive installer:

npx trigger.dev@latest install-mcp
pnpm dlx trigger.dev@latest install-mcp
yarn dlx trigger.dev@latest install-mcp
bunx trigger.dev@latest install-mcp

It will detect your installed clients and configure them automatically. You can also copy-paste the config for your client below.

Client Configuration

Each client has a slightly different config format. Copy the snippet for your client into the appropriate file.

Install using the command line:

npx trigger.dev@latest install-mcp --client claude-code
pnpm dlx trigger.dev@latest install-mcp --client claude-code
yarn dlx trigger.dev@latest install-mcp --client claude-code
bunx trigger.dev@latest install-mcp --client claude-code

Or add this configuration to ~/.claude.json (user) or .mcp.json (project):

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

View Claude Code MCP docs ↗

After adding the config, restart your client. You should see a server named trigger connect automatically.

Authentication

The search_docs tool works without authentication, and so do the local-only tools list_profiles, dev_server_status and stop_dev_server. All other tools require you to be logged in via the Trigger.dev CLI. The first time you use an authenticated tool, your MCP client prompts you to log in.

A login stops working after 7 days without use. The next authenticated tool call starts the login flow again. If your client supports confirmation prompts, it asks first. Then the browser opens, and the call continues once you approve. See CLI login expiry.

The install-mcp command supports these options:

Core Options

  • -p, --project-ref <project ref> — Scope the MCP server to a specific project
  • -t, --tag <package tag> — CLI package version to use (default: latest)
  • --dev-only — Restrict to the dev environment only
  • --yolo — Install into all supported clients automatically
  • --scope <scope> — user, project, or local
  • --client <clients...> — Install into specific client(s)

Configuration Options

  • --log-file <log file> — Write logs to a file
  • -a, --api-url <value> — Custom Trigger.dev API URL
  • -l, --log-level <level> — Log level (debug, info, log, warn, error, none)

Examples

Install for all supported clients:

npx trigger.dev@latest install-mcp --yolo
pnpm dlx trigger.dev@latest install-mcp --yolo
yarn dlx trigger.dev@latest install-mcp --yolo
bunx trigger.dev@latest install-mcp --yolo

Install for specific clients:

npx trigger.dev@latest install-mcp --client claude-code cursor --scope user
pnpm dlx trigger.dev@latest install-mcp --client claude-code cursor --scope user
yarn dlx trigger.dev@latest install-mcp --client claude-code cursor --scope user
bunx trigger.dev@latest install-mcp --client claude-code cursor --scope user

Restrict to dev environment for a specific project:

npx trigger.dev@latest install-mcp --dev-only --project-ref proj_abc123
pnpm dlx trigger.dev@latest install-mcp --dev-only --project-ref proj_abc123
yarn dlx trigger.dev@latest install-mcp --dev-only --project-ref proj_abc123
bunx trigger.dev@latest install-mcp --dev-only --project-ref proj_abc123

To add these options to a manual config, append them to the args array:

{
  "args": ["trigger.dev@latest", "mcp", "--dev-only", "--project-ref", "proj_abc123"]
}

The mcp command also accepts --readonly, which hides the tools that write to your account (for example deploy, trigger_task and cancel_run) so the AI cannot make changes to it. It is only available as a manual config arg:

{
  "args": ["trigger.dev@latest", "mcp", "--readonly"]
}

Getting Started

Once installed, you can start using the MCP server by asking your AI assistant questions like:

  • "Search the trigger docs for a ffmpeg example"
  • "Initialize trigger.dev in my project"
  • "Get all tasks in my project"
  • "Trigger my foobar task with a sample payload"
  • "Get the details of the latest run for my foobar task"
  • "List all runs for my foobar task"
  • "Deploy my project to staging"
  • "Deploy my project to production"
  • "How many runs failed in the last 7 days?"
  • "Show me the overview dashboard metrics"
  • "What tables can I query?"

Next Steps

Was this page helpful?

Last updated

Edit on GitHub

On this page