docs/mcp-introduction.mdx
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:
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.
Each client has a slightly different config format. Copy the snippet for your client into the appropriate file.
<Tabs> <Tab title="Claude Code"> 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)
```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)
```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)
```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)
```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)
```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)
```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"]
}
}
}
```
```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)
```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"]
startup_timeout_sec = 30
```
<Note>The `startup_timeout_sec = 30` is recommended. Codex defaults to 10 seconds, which may not be enough for `npx` to download the package on first run.</Note>
```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)
```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/)
```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.
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--readonly — Read-only mode. Hides write tools (deploy, trigger_task, cancel_run) so the AI cannot make changes to your account--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
Read-only mode (prevents AI from deploying or triggering tasks):
npx trigger.dev@latest install-mcp --readonly
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"]
}
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?"