Describe the MCP server feature in the readme

This commit is contained in:
saadi
2025-03-11 19:17:46 +01:00
parent 603c903fbe
commit 7d65aa9299
3 changed files with 38 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"mcpServers": {
"trigger.dev": {
"url": "http://localhost:3333/sse"
}
}
}
+31
View File
@@ -19,6 +19,37 @@ Trigger.dev is an open source platform that makes it easy to create event-driven
| [list-profiles](https://trigger.dev/docs/cli-list-profiles-commands) | List all of your CLI profiles. |
| [update](https://trigger.dev/docs/cli-update-commands) | Updates all `@trigger.dev/*` packages to match the CLI version. |
## MCP Server
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open protocol that allows you to provide custom tools
to agentic LLM clients, like [Claude for Desktop](https://docs.anthropic.com/en/docs/claude-for-desktop/overview), [Cursor](https://www.cursor.com/), [Windsurf](https://windsurf.com/), etc...
The Trigger.dev CLI can expose an MCP server and enable you interact with Trigger.dev in agentic LLM workflows. For example, you can use
it to trigger tasks via natural language, view task runs, view logs, debug issues with task runs, etc...
### Starting the Trigger.dev MCP Server
To start the Trigger.dev MCP server, simply pass the `--mcp` flag to the `dev` command:
```bash
trigger dev --mcp
```
By default it runs on port `3333`. You can change this by passing the `--mcp-port` flag:
```bash
trigger dev --mcp --mcp-port 3334
```
### Configuring your MCP client
This depends on what tool you are using. For Cursor, the configuration is in the [.cursor/mcp.json](../../.cursor/mcp.json) file
and should be good to go as long as you use the default MCP server port.
Check out [Cursor's docs](https://docs.cursor.com/context/model-context-protocol) for further details.
Tip: try out [Cursor's YOLO mode](https://docs.cursor.com/context/model-context-protocol#yolo-mode) for a seamless experience :D
## Support
If you have any questions, please reach out to us on [Discord](https://trigger.dev/discord) and we'll be happy to help.
-1
View File
@@ -50,7 +50,6 @@ export function configureDevCommand(program: Command) {
"--keep-tmp-files",
"Keep temporary files after the dev session ends, helpful for debugging"
)
// TODO: add a more detailed description, maybe a pointer to the docs on how to use MCP
.option("--mcp", "Start the MCP server")
.option("--mcp-port", "The port to run the MCP server on", "3333")
).action(async (options) => {