Durable AI Workflows and MCP for JavaScript
AI tasks often take many steps and minutes, not milliseconds: extract, draft, review, revise, or an agent calling tools in a loop. If the process crashes or a model call fails halfway, you don't want to start over or pay for the finished steps again. Durable workflow tools save each step's result and resume where the run stopped, with retries, queues and schedules built in.
The Model Context Protocol (MCP) is the standard way to give AI apps and agents access to tools and data. Its official SDK builds MCP servers that expose your functions, and clients that connect to any MCP server.
4 tools listed
MCP TypeScript SDK
Workflows & MCPOfficial SDK for the Model Context Protocol: build MCP servers that expose tools and data to AI apps, and clients that connect to them.
npm i @modelcontextprotocol/servermodelcontextprotocol/typescript-sdkInngest
Workflows & MCPDurable execution, events, and queues: step functions that retry and resume, cron jobs, and background work on any serverless platform.
npm i inngestinngest/inngest-jsTrigger.dev
Workflows & MCPOpen-source platform for long-running AI tasks and agents in TypeScript: no timeouts, retries, queues, human-in-the-loop waits, and realtime streaming.
npm i @trigger.dev/sdktriggerdotdev/trigger.devTemporal TypeScript SDK
Workflows & MCPDurable workflows as code on Temporal: workflows survive crashes and restarts and can run for days.
npm i @temporalio/clienttemporalio/sdk-typescriptHow to choose
Inside your app or a separate service
Agent frameworks such as Mastra and LangGraph.js can save workflow state to your own storage. Inngest and Trigger.dev run durable steps for you as a service, and Temporal runs on its own server. Pick by how much infrastructure you want to own.
Check timeouts
Serverless functions stop after a time limit. Long AI jobs need a tool that splits work into steps or runs it somewhere without limits.
Use the current MCP SDK
Version 2 of the MCP TypeScript SDK is split into @modelcontextprotocol/server and @modelcontextprotocol/client. The single @modelcontextprotocol/sdk package is the older v1 line.
Common questions
Do I need a workflow engine for a multi-step AI task?
Not for a short task that can simply run again. Once steps are slow, expensive or must not repeat, saving each step's result and resuming is worth it, whether from a framework or a durable workflow service.
What is MCP?
The Model Context Protocol: an open standard for connecting AI apps to tools and data. A server exposes tools, resources and prompts; any MCP client, such as Claude, ChatGPT, Cursor or your own agent, can use them.
Know a tool we're missing?
Suggest a JavaScript AI tool for the directory. Prepare your suggestion here, then email it to us for review.