@trigger.dev/sdk 4.5.0-rc.5 → 4.5.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/v3/ai.d.ts +178 -5
- package/dist/commonjs/v3/ai.js +603 -119
- package/dist/commonjs/v3/ai.js.map +1 -1
- package/dist/commonjs/v3/chat-client.js +3 -0
- package/dist/commonjs/v3/chat-client.js.map +1 -1
- package/dist/commonjs/v3/chat-react.js +10 -7
- package/dist/commonjs/v3/chat-react.js.map +1 -1
- package/dist/commonjs/v3/chat-server.d.ts +8 -0
- package/dist/commonjs/v3/chat-server.js +32 -10
- package/dist/commonjs/v3/chat-server.js.map +1 -1
- package/dist/commonjs/v3/chat-server.test.js +51 -0
- package/dist/commonjs/v3/chat-server.test.js.map +1 -1
- package/dist/commonjs/v3/chat.js +34 -6
- package/dist/commonjs/v3/chat.js.map +1 -1
- package/dist/commonjs/v3/chat.test.js +53 -0
- package/dist/commonjs/v3/chat.test.js.map +1 -1
- package/dist/commonjs/v3/createStartSessionAction.test.js +30 -0
- package/dist/commonjs/v3/createStartSessionAction.test.js.map +1 -1
- package/dist/commonjs/v3/sessions.d.ts +11 -6
- package/dist/commonjs/v3/sessions.js +10 -5
- package/dist/commonjs/v3/sessions.js.map +1 -1
- package/dist/commonjs/v3/test/mock-chat-agent.d.ts +6 -0
- package/dist/commonjs/v3/test/mock-chat-agent.js +1 -0
- package/dist/commonjs/v3/test/mock-chat-agent.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/ai.d.ts +178 -5
- package/dist/esm/v3/ai.js +603 -120
- package/dist/esm/v3/ai.js.map +1 -1
- package/dist/esm/v3/chat-client.js +3 -0
- package/dist/esm/v3/chat-client.js.map +1 -1
- package/dist/esm/v3/chat-react.js +10 -7
- package/dist/esm/v3/chat-react.js.map +1 -1
- package/dist/esm/v3/chat-server.d.ts +8 -0
- package/dist/esm/v3/chat-server.js +32 -10
- package/dist/esm/v3/chat-server.js.map +1 -1
- package/dist/esm/v3/chat-server.test.js +51 -0
- package/dist/esm/v3/chat-server.test.js.map +1 -1
- package/dist/esm/v3/chat.js +34 -6
- package/dist/esm/v3/chat.js.map +1 -1
- package/dist/esm/v3/chat.test.js +53 -0
- package/dist/esm/v3/chat.test.js.map +1 -1
- package/dist/esm/v3/createStartSessionAction.test.js +30 -0
- package/dist/esm/v3/createStartSessionAction.test.js.map +1 -1
- package/dist/esm/v3/sessions.d.ts +11 -6
- package/dist/esm/v3/sessions.js +10 -5
- package/dist/esm/v3/sessions.js.map +1 -1
- package/dist/esm/v3/test/mock-chat-agent.d.ts +6 -0
- package/dist/esm/v3/test/mock-chat-agent.js +1 -0
- package/dist/esm/v3/test/mock-chat-agent.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/ai/prompts.mdx +430 -0
- package/docs/ai-chat/actions.mdx +115 -0
- package/docs/ai-chat/anatomy.mdx +71 -0
- package/docs/ai-chat/backend.mdx +817 -0
- package/docs/ai-chat/background-injection.mdx +221 -0
- package/docs/ai-chat/changelog.mdx +850 -0
- package/docs/ai-chat/chat-local.mdx +174 -0
- package/docs/ai-chat/client-protocol.mdx +1081 -0
- package/docs/ai-chat/compaction.mdx +411 -0
- package/docs/ai-chat/custom-agents.mdx +364 -0
- package/docs/ai-chat/error-handling.mdx +415 -0
- package/docs/ai-chat/fast-starts.mdx +672 -0
- package/docs/ai-chat/frontend.mdx +580 -0
- package/docs/ai-chat/how-it-works.mdx +230 -0
- package/docs/ai-chat/lifecycle-hooks.mdx +530 -0
- package/docs/ai-chat/mcp.mdx +101 -0
- package/docs/ai-chat/overview.mdx +90 -0
- package/docs/ai-chat/patterns/branching-conversations.mdx +284 -0
- package/docs/ai-chat/patterns/code-sandbox.mdx +126 -0
- package/docs/ai-chat/patterns/database-persistence.mdx +414 -0
- package/docs/ai-chat/patterns/human-in-the-loop.mdx +275 -0
- package/docs/ai-chat/patterns/large-payloads.mdx +169 -0
- package/docs/ai-chat/patterns/oom-resilience.mdx +120 -0
- package/docs/ai-chat/patterns/persistence-and-replay.mdx +211 -0
- package/docs/ai-chat/patterns/recovery-boot.mdx +230 -0
- package/docs/ai-chat/patterns/skills.mdx +221 -0
- package/docs/ai-chat/patterns/sub-agents.mdx +383 -0
- package/docs/ai-chat/patterns/tool-result-auditing.mdx +148 -0
- package/docs/ai-chat/patterns/trusted-edge-signals.mdx +337 -0
- package/docs/ai-chat/patterns/version-upgrades.mdx +172 -0
- package/docs/ai-chat/pending-messages.mdx +343 -0
- package/docs/ai-chat/prompt-caching.mdx +206 -0
- package/docs/ai-chat/quick-start.mdx +161 -0
- package/docs/ai-chat/reference.mdx +909 -0
- package/docs/ai-chat/server-chat.mdx +263 -0
- package/docs/ai-chat/sessions.mdx +333 -0
- package/docs/ai-chat/testing.mdx +682 -0
- package/docs/ai-chat/tools.mdx +191 -0
- package/docs/ai-chat/types.mdx +242 -0
- package/docs/ai-chat/upgrade-guide.mdx +515 -0
- package/docs/apikeys.mdx +54 -0
- package/docs/building-with-ai.mdx +261 -0
- package/docs/bulk-actions.mdx +49 -0
- package/docs/changelog.mdx +6 -0
- package/docs/cli-deploy-commands.mdx +9 -0
- package/docs/cli-dev-commands.mdx +9 -0
- package/docs/cli-dev.mdx +8 -0
- package/docs/cli-init-commands.mdx +58 -0
- package/docs/cli-introduction.mdx +25 -0
- package/docs/cli-list-profiles-commands.mdx +42 -0
- package/docs/cli-login-commands.mdx +33 -0
- package/docs/cli-logout-commands.mdx +33 -0
- package/docs/cli-preview-archive.mdx +59 -0
- package/docs/cli-promote-commands.mdx +9 -0
- package/docs/cli-switch.mdx +43 -0
- package/docs/cli-update-commands.mdx +42 -0
- package/docs/cli-whoami-commands.mdx +33 -0
- package/docs/community.mdx +6 -0
- package/docs/config/config-file.mdx +602 -0
- package/docs/config/extensions/additionalFiles.mdx +38 -0
- package/docs/config/extensions/additionalPackages.mdx +40 -0
- package/docs/config/extensions/aptGet.mdx +34 -0
- package/docs/config/extensions/audioWaveform.mdx +20 -0
- package/docs/config/extensions/custom.mdx +380 -0
- package/docs/config/extensions/emitDecoratorMetadata.mdx +29 -0
- package/docs/config/extensions/esbuildPlugin.mdx +31 -0
- package/docs/config/extensions/ffmpeg.mdx +45 -0
- package/docs/config/extensions/lightpanda.mdx +56 -0
- package/docs/config/extensions/overview.mdx +67 -0
- package/docs/config/extensions/playwright.mdx +195 -0
- package/docs/config/extensions/prismaExtension.mdx +1014 -0
- package/docs/config/extensions/puppeteer.mdx +30 -0
- package/docs/config/extensions/pythonExtension.mdx +182 -0
- package/docs/config/extensions/syncEnvVars.mdx +291 -0
- package/docs/context.mdx +235 -0
- package/docs/database-connections.mdx +213 -0
- package/docs/deploy-environment-variables.mdx +435 -0
- package/docs/deployment/atomic-deployment.mdx +172 -0
- package/docs/deployment/overview.mdx +257 -0
- package/docs/deployment/preview-branches.mdx +224 -0
- package/docs/errors-retrying.mdx +379 -0
- package/docs/github-actions.mdx +222 -0
- package/docs/github-integration.mdx +136 -0
- package/docs/github-repo.mdx +8 -0
- package/docs/help-email.mdx +6 -0
- package/docs/help-slack.mdx +11 -0
- package/docs/hidden-tasks.mdx +56 -0
- package/docs/how-it-works.mdx +454 -0
- package/docs/how-to-reduce-your-spend.mdx +217 -0
- package/docs/idempotency.mdx +504 -0
- package/docs/introduction.mdx +223 -0
- package/docs/limits.mdx +241 -0
- package/docs/logging.mdx +195 -0
- package/docs/machines.mdx +952 -0
- package/docs/manual-setup.mdx +632 -0
- package/docs/mcp-agent-rules.mdx +41 -0
- package/docs/mcp-introduction.mdx +385 -0
- package/docs/mcp-tools.mdx +273 -0
- package/docs/migrating-from-v3.mdx +334 -0
- package/docs/observability/dashboards.mdx +102 -0
- package/docs/observability/query.mdx +585 -0
- package/docs/open-source-contributing.mdx +16 -0
- package/docs/open-source-self-hosting.mdx +541 -0
- package/docs/private-networking/aws-console-setup.mdx +304 -0
- package/docs/private-networking/overview.mdx +144 -0
- package/docs/private-networking/troubleshooting.mdx +78 -0
- package/docs/queue-concurrency.mdx +354 -0
- package/docs/quick-start.mdx +97 -0
- package/docs/realtime/auth.mdx +208 -0
- package/docs/realtime/backend/overview.mdx +45 -0
- package/docs/realtime/backend/streams.mdx +418 -0
- package/docs/realtime/backend/subscribe.mdx +225 -0
- package/docs/realtime/how-it-works.mdx +94 -0
- package/docs/realtime/overview.mdx +63 -0
- package/docs/realtime/react-hooks/overview.mdx +73 -0
- package/docs/realtime/react-hooks/streams.mdx +449 -0
- package/docs/realtime/react-hooks/subscribe.mdx +674 -0
- package/docs/realtime/react-hooks/swr.mdx +87 -0
- package/docs/realtime/react-hooks/triggering.mdx +194 -0
- package/docs/realtime/react-hooks/use-wait-token.mdx +34 -0
- package/docs/realtime/run-object.mdx +174 -0
- package/docs/replaying.mdx +72 -0
- package/docs/request-feature.mdx +6 -0
- package/docs/roadmap.mdx +6 -0
- package/docs/run-tests.mdx +20 -0
- package/docs/run-usage.mdx +113 -0
- package/docs/runs/heartbeats.mdx +38 -0
- package/docs/runs/max-duration.mdx +139 -0
- package/docs/runs/metadata.mdx +734 -0
- package/docs/runs/priority.mdx +31 -0
- package/docs/runs.mdx +396 -0
- package/docs/self-hosting/docker.mdx +458 -0
- package/docs/self-hosting/env/supervisor.mdx +74 -0
- package/docs/self-hosting/env/webapp.mdx +276 -0
- package/docs/self-hosting/kubernetes.mdx +601 -0
- package/docs/self-hosting/overview.mdx +108 -0
- package/docs/skills.mdx +85 -0
- package/docs/tags.mdx +120 -0
- package/docs/tasks/overview.mdx +697 -0
- package/docs/tasks/scheduled.mdx +382 -0
- package/docs/tasks/schemaTask.mdx +413 -0
- package/docs/tasks/streams.mdx +884 -0
- package/docs/triggering.mdx +1320 -0
- package/docs/troubleshooting-alerts.mdx +385 -0
- package/docs/troubleshooting-debugging-in-vscode.mdx +8 -0
- package/docs/troubleshooting-github-issues.mdx +6 -0
- package/docs/troubleshooting-uptime-status.mdx +6 -0
- package/docs/troubleshooting.mdx +398 -0
- package/docs/upgrading-packages.mdx +80 -0
- package/docs/vercel-integration.mdx +207 -0
- package/docs/versioning.mdx +56 -0
- package/docs/video-walkthrough.mdx +23 -0
- package/docs/wait-for-token.mdx +540 -0
- package/docs/wait-for.mdx +42 -0
- package/docs/wait-until.mdx +53 -0
- package/docs/wait.mdx +18 -0
- package/docs/writing-tasks-introduction.mdx +33 -0
- package/package.json +10 -6
- package/skills/trigger-authoring-chat-agent/SKILL.md +296 -0
- package/skills/trigger-authoring-tasks/SKILL.md +254 -0
- package/skills/trigger-chat-agent-advanced/SKILL.md +368 -0
- package/skills/trigger-cost-savings/SKILL.md +116 -0
- package/skills/trigger-realtime-and-frontend/SKILL.md +276 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MCP Introduction"
|
|
3
|
+
sidebarTitle: "Introduction"
|
|
4
|
+
description: "Learn how to install and configure the Trigger.dev MCP Server"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What is the Trigger.dev MCP Server?
|
|
8
|
+
|
|
9
|
+
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:
|
|
10
|
+
|
|
11
|
+
- Search Trigger.dev documentation
|
|
12
|
+
- Initialize new Trigger.dev projects
|
|
13
|
+
- List and manage your projects and organizations
|
|
14
|
+
- Get task information and trigger task runs
|
|
15
|
+
- Deploy projects to different environments
|
|
16
|
+
- Monitor run details and list runs with filtering options
|
|
17
|
+
- Query your data with TRQL and run built-in dashboard metrics
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
The quickest way to get set up is the interactive installer:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx trigger.dev@latest install-mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
It will detect your installed clients and configure them automatically. You can also copy-paste the config for your client below.
|
|
28
|
+
|
|
29
|
+
## Client Configuration
|
|
30
|
+
|
|
31
|
+
Each client has a slightly different config format. Copy the snippet for your client into the appropriate file.
|
|
32
|
+
|
|
33
|
+
<Tabs>
|
|
34
|
+
<Tab title="Claude Code">
|
|
35
|
+
Install using the command line:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx trigger.dev@latest install-mcp --client claude-code
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Or add this configuration to `~/.claude.json` (user) or `.mcp.json` (project):
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"trigger": {
|
|
47
|
+
"command": "npx",
|
|
48
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
[View Claude Code MCP docs ↗](https://code.claude.com/docs/en/mcp)
|
|
55
|
+
</Tab>
|
|
56
|
+
<Tab title="Cursor">
|
|
57
|
+
Install using the command line:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx trigger.dev@latest install-mcp --client cursor
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or add this configuration to `~/.cursor/mcp.json` (user) or `.cursor/mcp.json` (project):
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"trigger": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
[View Cursor MCP docs ↗](https://cursor.com/docs/context/mcp)
|
|
77
|
+
</Tab>
|
|
78
|
+
<Tab title="Windsurf">
|
|
79
|
+
Install using the command line:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx trigger.dev@latest install-mcp --client windsurf
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Or add this configuration to `~/.codeium/windsurf/mcp_config.json`:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"trigger": {
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
[View Windsurf MCP docs ↗](https://docs.windsurf.com/windsurf/cascade/mcp)
|
|
99
|
+
</Tab>
|
|
100
|
+
<Tab title="VS Code">
|
|
101
|
+
Install using the command line:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx trigger.dev@latest install-mcp --client vscode
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Or add this configuration to `.vscode/mcp.json` (project) or `~/Library/Application Support/Code/User/mcp.json` (user, macOS):
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"servers": {
|
|
112
|
+
"trigger": {
|
|
113
|
+
"command": "npx",
|
|
114
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
<Note>VS Code uses `servers` instead of `mcpServers`.</Note>
|
|
121
|
+
|
|
122
|
+
[View VS Code MCP docs ↗](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
|
|
123
|
+
</Tab>
|
|
124
|
+
<Tab title="Zed">
|
|
125
|
+
Install using the command line:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npx trigger.dev@latest install-mcp --client zed
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Or add this configuration to `~/.config/zed/settings.json`:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"context_servers": {
|
|
136
|
+
"trigger": {
|
|
137
|
+
"source": "custom",
|
|
138
|
+
"command": "npx",
|
|
139
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
[View Zed context servers docs ↗](https://zed.dev/docs/ai/mcp)
|
|
146
|
+
</Tab>
|
|
147
|
+
<Tab title="Cline">
|
|
148
|
+
Install using the command line:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npx trigger.dev@latest install-mcp --client cline
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Or add this configuration to `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"mcpServers": {
|
|
159
|
+
"trigger": {
|
|
160
|
+
"command": "npx",
|
|
161
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
[View Cline MCP docs ↗](https://docs.cline.bot/mcp/configuring-mcp-servers)
|
|
168
|
+
</Tab>
|
|
169
|
+
<Tab title="Gemini CLI">
|
|
170
|
+
Install using the command line:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx trigger.dev@latest install-mcp --client gemini-cli
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Or add this configuration to `~/.gemini/settings.json` (user) or `.gemini/settings.json` (project):
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"mcpServers": {
|
|
181
|
+
"trigger": {
|
|
182
|
+
"command": "npx",
|
|
183
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
</Tab>
|
|
189
|
+
<Tab title="AMP">
|
|
190
|
+
Install using the command line:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
npx trigger.dev@latest install-mcp --client amp
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Or add this configuration to `~/.config/amp/settings.json`:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"amp.mcpServers": {
|
|
201
|
+
"trigger": {
|
|
202
|
+
"command": "npx",
|
|
203
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
[View Sourcegraph AMP MCP docs ↗](https://ampcode.com/manual#mcp)
|
|
210
|
+
</Tab>
|
|
211
|
+
<Tab title="Codex CLI">
|
|
212
|
+
Install using the command line:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
npx trigger.dev@latest install-mcp --client openai-codex
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Or add this configuration to `~/.codex/config.toml`:
|
|
219
|
+
|
|
220
|
+
```toml
|
|
221
|
+
[mcp_servers.trigger]
|
|
222
|
+
command = "npx"
|
|
223
|
+
args = ["trigger.dev@latest", "mcp"]
|
|
224
|
+
startup_timeout_sec = 30
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
<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>
|
|
228
|
+
</Tab>
|
|
229
|
+
<Tab title="Crush">
|
|
230
|
+
Install using the command line:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
npx trigger.dev@latest install-mcp --client crush
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
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`.
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"mcp": {
|
|
241
|
+
"trigger": {
|
|
242
|
+
"type": "stdio",
|
|
243
|
+
"command": "npx",
|
|
244
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
[View Charm MCP docs ↗](https://github.com/charmbracelet/crush)
|
|
251
|
+
</Tab>
|
|
252
|
+
<Tab title="opencode">
|
|
253
|
+
Install using the command line:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
npx trigger.dev@latest install-mcp --client opencode
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Or add this configuration to `~/.config/opencode/opencode.json` (user) or `./opencode.json` (project):
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"mcp": {
|
|
264
|
+
"trigger": {
|
|
265
|
+
"type": "local",
|
|
266
|
+
"command": ["npx", "trigger.dev@latest", "mcp"],
|
|
267
|
+
"enabled": true
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
[View opencode MCP docs ↗](https://opencode.ai/docs/mcp-servers/)
|
|
274
|
+
</Tab>
|
|
275
|
+
<Tab title="Ruler">
|
|
276
|
+
Install using the command line:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
npx trigger.dev@latest install-mcp --client ruler
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Or add this configuration to `.ruler/mcp.json`:
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"mcpServers": {
|
|
287
|
+
"trigger": {
|
|
288
|
+
"type": "stdio",
|
|
289
|
+
"command": "npx",
|
|
290
|
+
"args": ["trigger.dev@latest", "mcp"]
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
</Tab>
|
|
296
|
+
</Tabs>
|
|
297
|
+
|
|
298
|
+
After adding the config, restart your client. You should see a server named **trigger** connect automatically.
|
|
299
|
+
|
|
300
|
+
## Authentication
|
|
301
|
+
|
|
302
|
+
The `search_docs` tool works without authentication. All other tools require you to be logged in via the [Trigger.dev CLI](/cli-login-commands). The first time you use an authenticated tool, your MCP client will prompt you to log in.
|
|
303
|
+
|
|
304
|
+
<Accordion title="CLI Options">
|
|
305
|
+
|
|
306
|
+
The `install-mcp` command supports these options:
|
|
307
|
+
|
|
308
|
+
**Core Options**
|
|
309
|
+
|
|
310
|
+
- `-p, --project-ref <project ref>` — Scope the MCP server to a specific project
|
|
311
|
+
- `-t, --tag <package tag>` — CLI package version to use (default: latest)
|
|
312
|
+
- `--dev-only` — Restrict to the dev environment only
|
|
313
|
+
- `--readonly` — Read-only mode. Hides write tools (`deploy`, `trigger_task`, `cancel_run`) so the AI cannot make changes to your account
|
|
314
|
+
- `--yolo` — Install into all supported clients automatically
|
|
315
|
+
- `--scope <scope>` — `user`, `project`, or `local`
|
|
316
|
+
- `--client <clients...>` — Install into specific client(s)
|
|
317
|
+
|
|
318
|
+
**Configuration Options**
|
|
319
|
+
|
|
320
|
+
- `--log-file <log file>` — Write logs to a file
|
|
321
|
+
- `-a, --api-url <value>` — Custom Trigger.dev API URL
|
|
322
|
+
- `-l, --log-level <level>` — Log level (debug, info, log, warn, error, none)
|
|
323
|
+
|
|
324
|
+
**Examples**
|
|
325
|
+
|
|
326
|
+
Install for all supported clients:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
npx trigger.dev@latest install-mcp --yolo
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Install for specific clients:
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
npx trigger.dev@latest install-mcp --client claude-code cursor --scope user
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Restrict to dev environment for a specific project:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
npx trigger.dev@latest install-mcp --dev-only --project-ref proj_abc123
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Read-only mode (prevents AI from deploying or triggering tasks):
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
npx trigger.dev@latest install-mcp --readonly
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
To add these options to a manual config, append them to the `args` array:
|
|
351
|
+
|
|
352
|
+
```json
|
|
353
|
+
{
|
|
354
|
+
"args": ["trigger.dev@latest", "mcp", "--dev-only", "--project-ref", "proj_abc123"]
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
</Accordion>
|
|
359
|
+
|
|
360
|
+
## Getting Started
|
|
361
|
+
|
|
362
|
+
Once installed, you can start using the MCP server by asking your AI assistant questions like:
|
|
363
|
+
|
|
364
|
+
- `"Search the trigger docs for a ffmpeg example"`
|
|
365
|
+
- `"Initialize trigger.dev in my project"`
|
|
366
|
+
- `"Get all tasks in my project"`
|
|
367
|
+
- `"Trigger my foobar task with a sample payload"`
|
|
368
|
+
- `"Get the details of the latest run for my foobar task"`
|
|
369
|
+
- `"List all runs for my foobar task"`
|
|
370
|
+
- `"Deploy my project to staging"`
|
|
371
|
+
- `"Deploy my project to production"`
|
|
372
|
+
- `"How many runs failed in the last 7 days?"`
|
|
373
|
+
- `"Show me the overview dashboard metrics"`
|
|
374
|
+
- `"What tables can I query?"`
|
|
375
|
+
|
|
376
|
+
## Next Steps
|
|
377
|
+
|
|
378
|
+
<CardGroup cols={2}>
|
|
379
|
+
<Card title="MCP Tools" icon="wrench" href="/mcp-tools">
|
|
380
|
+
Explore all available MCP tools for managing your projects.
|
|
381
|
+
</Card>
|
|
382
|
+
<Card title="Skills" icon="wand-magic-sparkles" href="/skills">
|
|
383
|
+
Portable instruction sets that teach AI assistants Trigger.dev patterns.
|
|
384
|
+
</Card>
|
|
385
|
+
</CardGroup>
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MCP Tools"
|
|
3
|
+
sidebarTitle: "Tools"
|
|
4
|
+
description: "Learn about how to use the tools available in the Trigger.dev MCP Server"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Documentation and Search Tools
|
|
8
|
+
|
|
9
|
+
### search_docs
|
|
10
|
+
|
|
11
|
+
Search the Trigger.dev documentation for guides, examples, and API references.
|
|
12
|
+
|
|
13
|
+
**Example usage:**
|
|
14
|
+
- `"How do I create a scheduled task?"`
|
|
15
|
+
- `"Show me webhook examples"`
|
|
16
|
+
- `"What are the deployment options?"`
|
|
17
|
+
|
|
18
|
+
## Project Management Tools
|
|
19
|
+
|
|
20
|
+
### list_orgs
|
|
21
|
+
|
|
22
|
+
List all organizations you have access to.
|
|
23
|
+
|
|
24
|
+
**Example usage:**
|
|
25
|
+
- `"What organizations do I have?"`
|
|
26
|
+
- `"Show me my orgs"`
|
|
27
|
+
|
|
28
|
+
### list_projects
|
|
29
|
+
|
|
30
|
+
List all projects in your Trigger.dev account.
|
|
31
|
+
|
|
32
|
+
**Example usage:**
|
|
33
|
+
- `"What projects do I have?"`
|
|
34
|
+
- `"List my Trigger.dev projects"`
|
|
35
|
+
|
|
36
|
+
### create_project_in_org
|
|
37
|
+
|
|
38
|
+
Create a new project in an organization.
|
|
39
|
+
|
|
40
|
+
**Example usage:**
|
|
41
|
+
- `"Create a new project called 'my-app'"`
|
|
42
|
+
- `"Set up a new Trigger.dev project"`
|
|
43
|
+
|
|
44
|
+
### initialize_project
|
|
45
|
+
|
|
46
|
+
Initialize Trigger.dev in your project with automatic setup and configuration.
|
|
47
|
+
|
|
48
|
+
**Example usage:**
|
|
49
|
+
- `"Set up Trigger.dev in this project"`
|
|
50
|
+
- `"Add Trigger.dev to my app"`
|
|
51
|
+
|
|
52
|
+
## Task Management Tools
|
|
53
|
+
|
|
54
|
+
### get_current_worker
|
|
55
|
+
|
|
56
|
+
Get the current worker for a project, including the worker version, SDK version, and registered tasks with their payload schemas.
|
|
57
|
+
|
|
58
|
+
**Example usage:**
|
|
59
|
+
- `"What tasks are available?"`
|
|
60
|
+
- `"Show me the tasks in dev"`
|
|
61
|
+
|
|
62
|
+
### trigger_task
|
|
63
|
+
|
|
64
|
+
Trigger a task to run with a specific payload. You can add a delay, set tags, configure retries, choose a machine size, set a TTL, or use an idempotency key.
|
|
65
|
+
|
|
66
|
+
**Example usage:**
|
|
67
|
+
- `"Run the email-notification task"`
|
|
68
|
+
- `"Trigger my-task with userId 123"`
|
|
69
|
+
- `"Execute the sync task in production"`
|
|
70
|
+
|
|
71
|
+
## Run Monitoring Tools
|
|
72
|
+
|
|
73
|
+
### get_run_details
|
|
74
|
+
|
|
75
|
+
Get detailed information about a specific task run, including logs and status. Enable debug mode to get the full trace with all logs and spans.
|
|
76
|
+
|
|
77
|
+
**Example usage:**
|
|
78
|
+
- `"Show me details for run run_abc123"`
|
|
79
|
+
- `"Why did this run fail?"`
|
|
80
|
+
|
|
81
|
+
### list_runs
|
|
82
|
+
|
|
83
|
+
List runs for a project. Filter by status, task, tags, version, machine size, or time period.
|
|
84
|
+
|
|
85
|
+
**Example usage:**
|
|
86
|
+
- `"Show me recent runs"`
|
|
87
|
+
- `"List failed runs from the last 7 days"`
|
|
88
|
+
- `"What runs are currently executing?"`
|
|
89
|
+
|
|
90
|
+
### wait_for_run_to_complete
|
|
91
|
+
|
|
92
|
+
Wait for a specific run to finish and return the result.
|
|
93
|
+
|
|
94
|
+
**Example usage:**
|
|
95
|
+
- `"Wait for run run_abc123 to complete"`
|
|
96
|
+
|
|
97
|
+
### cancel_run
|
|
98
|
+
|
|
99
|
+
Cancel a running or queued run.
|
|
100
|
+
|
|
101
|
+
**Example usage:**
|
|
102
|
+
- `"Cancel run run_abc123"`
|
|
103
|
+
- `"Stop that task"`
|
|
104
|
+
|
|
105
|
+
## Deployment Tools
|
|
106
|
+
|
|
107
|
+
### deploy
|
|
108
|
+
|
|
109
|
+
Deploy your project to staging or production.
|
|
110
|
+
|
|
111
|
+
**Example usage:**
|
|
112
|
+
- `"Deploy to production"`
|
|
113
|
+
- `"Deploy to staging"`
|
|
114
|
+
|
|
115
|
+
### list_deploys
|
|
116
|
+
|
|
117
|
+
List deployments for a project. Filter by status or time period.
|
|
118
|
+
|
|
119
|
+
**Example usage:**
|
|
120
|
+
- `"Show me recent deployments"`
|
|
121
|
+
- `"What's deployed to production?"`
|
|
122
|
+
|
|
123
|
+
### list_preview_branches
|
|
124
|
+
|
|
125
|
+
List all preview branches in the project.
|
|
126
|
+
|
|
127
|
+
**Example usage:**
|
|
128
|
+
- `"What preview branches exist?"`
|
|
129
|
+
- `"Show me preview deployments"`
|
|
130
|
+
|
|
131
|
+
## Profile Tools
|
|
132
|
+
|
|
133
|
+
### whoami
|
|
134
|
+
|
|
135
|
+
Show the current authenticated user, active CLI profile, email, and API URL.
|
|
136
|
+
|
|
137
|
+
**Example usage:**
|
|
138
|
+
- `"Who am I logged in as?"`
|
|
139
|
+
- `"What profile am I using?"`
|
|
140
|
+
|
|
141
|
+
### list_profiles
|
|
142
|
+
|
|
143
|
+
List all configured CLI profiles and which one is currently active.
|
|
144
|
+
|
|
145
|
+
**Example usage:**
|
|
146
|
+
- `"What profiles do I have?"`
|
|
147
|
+
- `"Show me my Trigger.dev profiles"`
|
|
148
|
+
|
|
149
|
+
### switch_profile
|
|
150
|
+
|
|
151
|
+
Switch the active CLI profile for this MCP session. This changes which Trigger.dev account and API URL are used for all subsequent tool calls.
|
|
152
|
+
|
|
153
|
+
**Example usage:**
|
|
154
|
+
- `"Switch to my production profile"`
|
|
155
|
+
- `"Use the staging profile"`
|
|
156
|
+
|
|
157
|
+
## Query and Analytics Tools
|
|
158
|
+
|
|
159
|
+
### get_query_schema
|
|
160
|
+
|
|
161
|
+
Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and allowed values. Call this before using the query tool to understand what data is available.
|
|
162
|
+
|
|
163
|
+
**Example usage:**
|
|
164
|
+
- `"What tables and columns can I query?"`
|
|
165
|
+
- `"Show me the query schema"`
|
|
166
|
+
|
|
167
|
+
### query
|
|
168
|
+
|
|
169
|
+
Execute a TRQL query against your Trigger.dev data. TRQL is a SQL-style query language for analyzing runs, metrics, and LLM usage.
|
|
170
|
+
|
|
171
|
+
**Example usage:**
|
|
172
|
+
- `"How many runs failed in the last 7 days?"`
|
|
173
|
+
- `"Show me the top 10 most expensive tasks"`
|
|
174
|
+
- `"Query the average execution duration by task"`
|
|
175
|
+
|
|
176
|
+
### list_dashboards
|
|
177
|
+
|
|
178
|
+
List available built-in dashboards with their widgets. Each dashboard contains pre-built queries for common metrics.
|
|
179
|
+
|
|
180
|
+
**Example usage:**
|
|
181
|
+
- `"What dashboards are available?"`
|
|
182
|
+
- `"Show me the dashboard widgets"`
|
|
183
|
+
|
|
184
|
+
### run_dashboard_query
|
|
185
|
+
|
|
186
|
+
Execute a single widget query from a built-in dashboard. Use `list_dashboards` first to see available dashboards and widget IDs.
|
|
187
|
+
|
|
188
|
+
**Example usage:**
|
|
189
|
+
- `"Run the total runs widget from the overview dashboard"`
|
|
190
|
+
- `"Show me the LLM cost over time from the AI dashboard"`
|
|
191
|
+
|
|
192
|
+
## Dev Server Tools
|
|
193
|
+
|
|
194
|
+
### start_dev_server
|
|
195
|
+
|
|
196
|
+
Start the Trigger.dev dev server (`trigger dev`) in the background. Waits up to 30 seconds for the worker to be ready.
|
|
197
|
+
|
|
198
|
+
**Example usage:**
|
|
199
|
+
- `"Start the dev server"`
|
|
200
|
+
- `"Run trigger dev"`
|
|
201
|
+
|
|
202
|
+
### stop_dev_server
|
|
203
|
+
|
|
204
|
+
Stop the running Trigger.dev dev server.
|
|
205
|
+
|
|
206
|
+
**Example usage:**
|
|
207
|
+
- `"Stop the dev server"`
|
|
208
|
+
|
|
209
|
+
### dev_server_status
|
|
210
|
+
|
|
211
|
+
Check the status of the dev server and view recent output. Shows whether it is stopped, starting, ready, or has errors.
|
|
212
|
+
|
|
213
|
+
**Example usage:**
|
|
214
|
+
- `"Is the dev server running?"`
|
|
215
|
+
- `"Show me the dev server logs"`
|
|
216
|
+
- `"Are there any build errors?"`
|
|
217
|
+
|
|
218
|
+
<Callout type="warning">
|
|
219
|
+
The deploy and list_preview_branches tools are not available when the MCP server is running with the `--dev-only` flag. The `--readonly` flag hides deploy, trigger_task, and cancel_run.
|
|
220
|
+
</Callout>
|
|
221
|
+
|
|
222
|
+
## Agent Chat Tools
|
|
223
|
+
|
|
224
|
+
These tools let you have conversations with [chat agents](/ai-chat/overview) directly from your AI coding tool. See the [Agent MCP guide](/ai-chat/mcp) for a walkthrough.
|
|
225
|
+
|
|
226
|
+
### list_agents
|
|
227
|
+
|
|
228
|
+
List all chat agents registered in the current worker. Agents are tasks created with `chat.agent()` or `chat.customAgent()`.
|
|
229
|
+
|
|
230
|
+
**Example usage:**
|
|
231
|
+
- `"What agents are available?"`
|
|
232
|
+
- `"List my chat agents"`
|
|
233
|
+
|
|
234
|
+
### start_agent_chat
|
|
235
|
+
|
|
236
|
+
Start a conversation with a chat agent. Returns a chat ID for use with `send_agent_message`. Optionally preloads the agent so it initializes before the first message.
|
|
237
|
+
|
|
238
|
+
**Parameters:**
|
|
239
|
+
- `agentId` (required) — The agent task slug (e.g., `"support-agent"`)
|
|
240
|
+
- `chatId` (optional) — A custom conversation ID. Auto-generated if omitted
|
|
241
|
+
- `clientData` (optional) — Client data to include with every message (e.g., `{ userId: "user_123" }`). Must match the agent's `clientDataSchema` if one is defined
|
|
242
|
+
- `preload` (optional, default: `true`) — Whether to preload the agent before the first message
|
|
243
|
+
|
|
244
|
+
**Example usage:**
|
|
245
|
+
- `"Start a chat with the support agent"`
|
|
246
|
+
- `"Talk to the pr-review agent with userId abc"`
|
|
247
|
+
|
|
248
|
+
### send_agent_message
|
|
249
|
+
|
|
250
|
+
Send a message to an active agent chat and get the full response back. The agent remembers full context from previous messages in the same chat.
|
|
251
|
+
|
|
252
|
+
**Parameters:**
|
|
253
|
+
- `chatId` (required) — The chat ID from `start_agent_chat`
|
|
254
|
+
- `message` (required) — The message text to send
|
|
255
|
+
|
|
256
|
+
**Example usage:**
|
|
257
|
+
- `"Tell the agent to review the latest PR"`
|
|
258
|
+
- `"Ask it what tools it has available"`
|
|
259
|
+
|
|
260
|
+
### close_agent_chat
|
|
261
|
+
|
|
262
|
+
Close an agent chat conversation. The agent exits its loop gracefully. Without this, the agent will close on its own when its idle timeout expires.
|
|
263
|
+
|
|
264
|
+
**Parameters:**
|
|
265
|
+
- `chatId` (required) — The chat ID to close
|
|
266
|
+
|
|
267
|
+
**Example usage:**
|
|
268
|
+
- `"Close the chat"`
|
|
269
|
+
- `"End the conversation"`
|
|
270
|
+
|
|
271
|
+
<Callout type="warning">
|
|
272
|
+
The `start_agent_chat`, `send_agent_message`, and `close_agent_chat` tools are write operations and are not available in readonly mode.
|
|
273
|
+
</Callout>
|