Skip to main content

Workflows as MCP tools

Any workflow can present itself to an AI agent as an MCP tool server. The workflow describes its own tools, and each tool call runs the workflow again with the tool name as the event.

  1. Handle the __internal__mcp-server-start event and output a server config: serverName, serverVersion, and a tools array of {name, title, description, inputSchema}.
  2. Handle __internal__mcp-server-tool-call.<toolName> for each tool you declared. The tool arguments arrive as the workflow inputs.
  3. Point your agent at the MCP endpoint below, with a project API key that has run permission on the workflow.

The transport is streamable HTTP. Whatever the workflow outputs is returned as the tool result — objects are JSON-encoded automatically.

MCP server endpointALL /projects/:projectid/workflows/:workflowid/mcp