iCreatAI News
Skip to content
Mastra Blog·· 5 days agoAI score58

Introducing MCP Tasks in Mastra

Introducing MCP Tasks in Mastra

AI summary

Mastra now supports MCP Tasks in its MCPServer and MCPClient, letting long-running tool calls run in the background so the agent loop stays unblocked while the client polls the server for status (working, input_required, completed, failed, or cancelled). Tools can be configured to run as tasks with "always", "auto" (after syncWindowMs, 2 seconds by default), or "off", and tasks can still use suspend() for human input. The feature requires @mastra/[email protected] and @mastra/[email protected] or later and is still experimental, so the API may change between releases.

Source: Mastra Blog · mastra.ai