Trigger.dev (local)
Trigger.dev publishes its MCP server as a local command. The Trigger.dev card with the Official badge starts it on each person's computer:
npx -y trigger.dev@latest mcp --readonly
The command is already filled in. This server is Local. Each person connects over STDIO. See Local MCP and MCP Introduction.
The same name appears on the built-in Trigger.dev connector, with a By Willow badge. That connector calls the management API with an environment API key. This Official card passes Trigger.dev's --readonly flag, which hides the tools that write, including deploy, trigger_task, and cancel_run. Use the built-in connector to change runs, schedules, queues, deployments, or environment variables.
| If you need | Use |
|---|---|
| An agent to change runs, schedules, queues, deployments, or environment variables | By Willow connector |
| A shared identity scoped to one environment | By Willow connector |
| One connection across every organization, project, and environment that person can see, read only | Official server |
A personal access token acts as that person and reaches every organization, project, and environment they can access. See Authentication.
Before you start
On every computer that will use the server:
- Node.js, so
npxcan starttrigger.devand Willow's local client. See Local MCP.
Personal access token
The card sets TRIGGER_ACCESS_TOKEN from the key each person pastes. The server accepts that variable only when the value is a personal access token, which starts with tr_pat_. Create one on the Personal Access Tokens page.
A token created there expires on the date you choose: 30 days, 90 days, 1 year, or another day up to a year away. It stops working at the end of that day (UTC). See Authentication.
MCP Introduction describes a browser login for a server started without TRIGGER_ACCESS_TOKEN. This card sets the variable, so people paste a token. search_docs works without a token. The other tools need one.
An environment API key starts with tr_dev_, tr_stg_, tr_prod_, or tr_preview_. The server rejects those in TRIGGER_ACCESS_TOKEN. Use the built-in connector for an environment API key.
For a self-hosted instance, create the token in that instance's dashboard. A token is sent to the API URL you set below.
Set up Willow
- Go to MCP Servers → + Add MCP server. Open the Trigger.dev card with the Official badge and click + Use.
- Leave Local MCP on. The command is already
npx, with arguments-y,trigger.dev@latest,mcp, and--readonly. - Leave API URL as
https://api.trigger.devfor Trigger.dev Cloud. For a self-hosted instance, set it to that instance's webapp URL, for examplehttps://trigger.example.com. Willow passes it asTRIGGER_API_URL. - Keep Personal API keys so each person pastes their own token.
- Assign groups and Publish.
Each person
- Confirm
npxruns on that computer. - On the MCP Servers page, open this server and click Use. Copy the STDIO configuration into the AI client. See Local MCP servers.
- When Willow asks for a key, paste the personal access token (
tr_pat_…).
The token is sent to that computer with the rest of the server configuration. See Local MCP.
To check the connection, ask the agent to run whoami. Trigger.dev documents that tool as returning the signed-in user, email, and API URL.
Troubleshooting
"Your TRIGGER_ACCESS_TOKEN is not a Personal Access Token"
Cause: The pasted value is not a personal access token. Those start with tr_pat_.
Solution: Create a token on the Personal Access Tokens page and paste that. For an environment API key, add the built-in connector.
The token is rejected as expired
Cause: A personal access token expires at the end of the day (UTC) chosen when it was created. Trigger.dev returns 401 with code personal_access_token_expired.
Solution: Create a new token on the same page and paste it again.
npx is not found
Cause: Node.js is missing, or npx is not on the PATH, on the computer that starts the server.
Solution: Install Node.js and connect again.
Calls reach the wrong Trigger.dev instance
Cause: API URL is empty or points at a different instance than the one that issued the token. The server reads TRIGGER_API_URL as the API address, including when the value is empty.
Solution: Set API URL to https://api.trigger.dev for Trigger.dev Cloud, or to the self-hosted webapp URL, and publish again. Paste a token from that instance.
A tool such as deploy or trigger_task is missing
Cause: The card runs with --readonly. Trigger.dev hides the tools that write, including deploy, trigger_task, cancel_run, and replay_run.
Solution: Use the built-in connector for changes.