Mastra launches built-in MCP server for agents and workflows
Mastra announced a built-in MCP server that exposes agents, workflows, and tools at the /api/mcp endpoint after users install @mastra/mcp and configure authentication. It provides call_agent, start_workflow, and get_trace tools, supports selective exposure, and routes requests through standard Mastra HTTP routes with configured RBAC and FGA checks. Mastra also documents connecting the server to Claude Code over HTTP.
The release gives MCP clients a standard interface for invoking Mastra agents and workflows while retaining configured authentication and access controls, though most capability details come from Mastra itself.
You can now expose your agents, workflows, and tools to MCP using the new built-in MCP server. Install @mastra/mcp, configure auth, and your whole Mastra server becomes available at /api/mcp.
The MCP server comes equipped with tools to call_agent, start_workflow, and get_trace. Configured coding agents, or connected MCP clients, can then handle tasks you'd normally do yourself using the Studio UI.
Your browser does not support the video tag.
This release builds on our existing MCP 2.0 support, and joins MCP tasks and MCP events as the latest addition to Mastra's MCP server and client capabilities.
Requests will typically require a bearer token, verified by your auth provider. Each MCP tool call uses the same server routes as standard HTTP requests, and goes through the same RBAC and FGA checks (if configured). You can also choose which agents, workflows, and tools the MCP server exposes.
Get started
Install the following packages, this example uses Mastra platform auth. Any supported auth provider will also work:
#Mastra#Mastra Built-in MCP Server#@mastra/mcp#Mastra Studio#Claude Code