Trigger.dev MCP server
Trigger.dev's official MCP server: scaffold projects, trigger and debug background tasks, deploy to any environment, and run TRQL queries from your agent.
Trigger.dev is a platform for long-running background tasks and durable workflows that you write in TypeScript and run without managing queues or timeouts. Its official MCP server ships inside the Trigger.dev CLI, so an agent can add Trigger.dev to a project, trigger and debug task runs, deploy to production or preview environments, and query operational data — turning the assistant into a hands-on operator of your background jobs.
The server exposes a broad tool surface across the whole lifecycle: project and org management (list orgs and projects, create a project, initialize Trigger.dev in a codebase), tasks (list tasks, inspect the current worker, fetch a task's payload schema, trigger a task), runs (list and filter runs, get run and span trace details, wait for a run to complete, cancel a run), deployments and preview branches, a TRQL query engine for analyzing runs and metrics with companion schema and dashboard tools, a local dev-server controller, CLI profile management, documentation search, and a managed-prompts toolkit plus chat-agent tools for tasks built with chat.agent(). It is launched with npx trigger.dev@latest mcp over stdio and authenticates with a personal access token (TRIGGER_ACCESS_TOKEN); flags like --project-ref, --dev-only, --readonly, --api-url, and --log-level scope and harden the session. The search_docs tool works without authentication.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Available tools
| Tool | Description |
|---|---|
| search_docs | Search across the Trigger.dev documentation to find relevant information, code examples, API references, and guides. Works without authentication. |
| list_projects | List all projects for the current user; useful when searching for a project or looking up a projectRef. |
| list_orgs | List all organizations for the current user. Useful when looking up an org slug or ID. |
| create_project_in_org | Create a new project in an organization. Use only when adding Trigger.dev to an existing project. |
| initialize_project | Initialize Trigger.dev in your project, creating a new project in the organization you select. |
| get_tasks | Get all tasks in the project; useful when searching for a task or looking up a task identifier/slug. |
| get_current_worker | Get the current worker for the project, including version and registered task slugs. |
| get_task_schema | Get the payload schema for a specific task. Use get_current_worker first to see available task slugs. |
| trigger_task | Trigger a task in the project. Use get_tasks to list tasks and ask the user to select one. |
| get_run_details | Get the details and trace of a run; trace events are paginated, with the first call returning run details and the first page. |
| get_span_details | Get detailed information about a specific span within a run trace. |
| wait_for_run_to_complete | Wait for a run (ID starting with run_) to complete, with an optional timeoutInSeconds parameter (default 60s). |
| cancel_run | Cancel a run by its ID, which starts with run_. |
| list_runs | List all runs for a project; use when searching for a run or listing all runs. |
| deploy | Deploy a project, triggering a deployment. This is a long-running operation. |
| list_deploys | List all deploys for a project; use when searching for a deploy or listing all deploys. |
| list_preview_branches | List all preview branches for a project. |
| query | Execute a TRQL query against your Trigger.dev data — a SQL-style query language for analyzing runs and metrics. |
| get_query_schema | Get the column schema for a specific TRQL table. Available tables: runs, metrics, llm_metrics. |
| list_dashboards | List available built-in dashboards with their widgets. Each dashboard contains pre-built queries for common metrics. |
| run_dashboard_query | Execute a single widget query from a built-in dashboard. Use list_dashboards first to see what's available. |
| whoami | Show the current authenticated user, active CLI profile, email, and API URL. |
| list_profiles | List all configured CLI profiles and show which one is currently active. |
| switch_profile | Switch the active CLI profile for this MCP session, changing which Trigger.dev account is used. |
| start_dev_server | Start the Trigger.dev dev server (trigger dev) in the background, waiting up to 30 seconds for the worker. |
| stop_dev_server | Stop the running Trigger.dev dev server. |
| dev_server_status | Check the status of the dev server and view recent output (stopped, starting, or ready). |
| list_prompts | List all managed prompts in the project environment, showing slug, current version, and override status. |
| get_prompt_versions | List all versions for a specific prompt, showing version number, labels, source, model, and content. |
| promote_prompt_version | Promote a prompt version to be the current active version. Only code-sourced versions can be promoted. |
| create_prompt_override | Create a dashboard override for a prompt that takes precedence over the current code version. |
| update_prompt_override | Update the active dashboard override for a prompt. Works only if an override is currently active. |
| remove_prompt_override | Remove the active dashboard override for a prompt, reverting to the current code version. |
| reactivate_prompt_override | Reactivate a previous dashboard-sourced version as the active override. |
| list_agents | List all chat agents in the current worker — tasks created with chat.agent() or chat.customAgent(). |
| start_agent_chat | Start a conversation with a chat agent. Returns a chatId for use with send_agent_message. |
| send_agent_message | Send a message to an active agent chat and get the full response text back; the agent remembers full context. |
| close_agent_chat | Close an agent chat conversation so the agent exits its loop gracefully. |
Required configuration
- TRIGGER_ACCESS_TOKENRequired
Trigger.dev personal access token (tr_pat_...). Authenticates the MCP server. Obtained via trigger.dev login or the dashboard.
What you can do with it
Trigger and debug background tasks from your editor
Ask the agent to run a task with a test payload: it calls get_tasks, get_task_schema, then trigger_task, and follows up with get_run_details and get_span_details to walk the trace when something fails — all without opening the dashboard.
Deploy and analyze workloads conversationally
Have the agent deploy to a preview branch with deploy, watch the result, then run a TRQL query to surface error rates or slow runs over the last hour using query and run_dashboard_query.
FAQ
- Is it free?
- The MCP server ships free with the open-source Trigger.dev CLI. It operates against your Trigger.dev account; the platform has a free tier plus paid plans billed on usage. You pay only for the runs and compute you consume.
- Does it support remote/OAuth?
- It runs locally over stdio via npx trigger.dev@latest mcp and authenticates with a personal access token (TRIGGER_ACCESS_TOKEN) rather than OAuth. Flags such as --dev-only and --readonly let you restrict the session to the dev environment or hide write tools.