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()
.

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.

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
- We now support MongoDB as a storage backend. You can also pass options to MongoDBStore, similar to how options are passed in the Vector case.
- We added configuration for the
mastra
package in the Verdaccio registry setup for E2E testing environment. - We added runtimeContext to evals..
That’s all for this week. Happy building 🚀