Skip to content

Latest commit

 

History

History
374 lines (294 loc) · 9.19 KB

File metadata and controls

374 lines (294 loc) · 9.19 KB
title MCP Introduction
sidebarTitle Introduction
description 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

Installation

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

npx 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:
```bash
npx trigger.dev@latest install-mcp --client claude-code
```

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

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

[View Claude Code MCP docs ↗](https://code.claude.com/docs/en/mcp)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client cursor
```

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

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

[View Cursor MCP docs ↗](https://cursor.com/docs/context/mcp)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client windsurf
```

Or add this configuration to `~/.codeium/windsurf/mcp_config.json`:

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

[View Windsurf MCP docs ↗](https://docs.windsurf.com/windsurf/cascade/mcp)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client vscode
```

Or add this configuration to `.vscode/mcp.json` (project) or `~/Library/Application Support/Code/User/mcp.json` (user, macOS):

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

<Note>VS Code uses `servers` instead of `mcpServers`.</Note>

[View VS Code MCP docs ↗](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client zed
```

Or add this configuration to `~/.config/zed/settings.json`:

```json
{
  "context_servers": {
    "trigger": {
      "source": "custom",
      "command": "npx",
      "args": ["trigger.dev@latest", "mcp"]
    }
  }
}
```

[View Zed context servers docs ↗](https://zed.dev/docs/ai/mcp)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client cline
```

Or add this configuration to `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:

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

[View Cline MCP docs ↗](https://docs.cline.bot/mcp/configuring-mcp-servers)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client gemini-cli
```

Or add this configuration to `~/.gemini/settings.json` (user) or `.gemini/settings.json` (project):

```json
{
  "mcpServers": {
    "trigger": {
      "command": "npx",
      "args": ["trigger.dev@latest", "mcp"]
    }
  }
}
```
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client amp
```

Or add this configuration to `~/.config/amp/settings.json`:

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

[View Sourcegraph AMP MCP docs ↗](https://ampcode.com/manual#mcp)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client openai-codex
```

Or add this configuration to `~/.codex/config.toml`:

```toml
[mcp_servers.trigger]
command = "npx"
args = ["trigger.dev@latest", "mcp"]
```
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client crush
```

Or add this configuration to `.crush.json` (project), `crush.json`, or `~/.config/crush/crush.json` (user). Files are loaded in priority order: `.crush.json` → `crush.json` → `$HOME/.config/crush/crush.json`.

```json
{
  "mcp": {
    "trigger": {
      "type": "stdio",
      "command": "npx",
      "args": ["trigger.dev@latest", "mcp"]
    }
  }
}
```

[View Charm MCP docs ↗](https://github.com/charmbracelet/crush)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client opencode
```

Or add this configuration to `~/.config/opencode/opencode.json` (user) or `./opencode.json` (project):

```json
{
  "mcp": {
    "trigger": {
      "type": "local",
      "command": ["npx", "trigger.dev@latest", "mcp"],
      "enabled": true
    }
  }
}
```

[View opencode MCP docs ↗](https://opencode.ai/docs/mcp-servers/)
Install using the command line:
```bash
npx trigger.dev@latest install-mcp --client ruler
```

Or add this configuration to `.ruler/mcp.json`:

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

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

Authentication

The search_docs tool works without authentication. 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 will prompt you to log in.

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

Install for specific clients:

npx 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

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"]
}

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"

Next Steps

Explore all available MCP tools for managing your projects. Portable instruction sets that teach AI assistants Trigger.dev patterns. Install comprehensive rule sets directly into your AI client.