Blog

Mastra Changelog 2025-05-29

It’s been an eventful past few weeks at Mastra. Last week we shipped Mastra 0.10. Yesterday we publicly announced the hackathon winners. And today we’re back with more updates.

Let’s dig in…

Pass agents into MCPServer

Agents can now be directly passed into the MCPServer class, automatically creating tools from them (with the naming convention ask_<agentId>.) The agent description is converted into a tool description and the tool will call agent.generate().

MCP Server with agents example

Pass workflows into MCPServer

Similarly, you can also pass workflow instances into the MCPServer class. This gives you a tool for each workflow. The workflow inputSchema and description are used as the tool inputSchema and description. Calling the tool will start the workflow.

MCP Server with workflows example

Stream workflows

We added streaming support (stream) for workflows so users can see exactly what step an executed workflow is on.

const { stream } = run.stream({inputData: {}))
for await (const data of stream) {
  if (data.type === 'step-suspended') {
    // make it async to show that execution is not blocked
    setImmediate(() => {
      const resumeData = { stepId: 'promptAgent', context: { userInput: 'test input for resumption' } };
      run.resume({ resumeData: resumeData as any, step: promptAgent });
    });
  }
}

This works similarly to the client-js watch SDK.

Other updates

That’s all for this week. Happy building 🚀

Share

Stay up to date