Skip to main content
Back to timeline
mastra.aiSource publication:

Mastra exposes agents, workflows and tools through a built-in MCP server, letting coding agents call them directly

Synopsis

Mastra released a built-in MCP server: install @mastra/mcp and configure auth, and the whole Mastra server becomes available at /api/mcp to MCP clients. Tasks that previously had to be done by hand through the Studio UI can now be handled by configured coding agents or connected MCP clients. The server ships tools to call_agent, start_workflow and get_trace, and each call uses the same server routes as standard HTTP requests, passing the same RBAC and FGA checks.

Source-provided article image: Introducing Mastra's Built-in MCP Server
mastra.ai

Interpretation

Mastra's agents, workflows and tools can now be exposed through a built-in MCP server, so MCP clients can start these operations without going through the Studio UI. Previously these tasks were typically handled by the user in the Studio UI, and Mastra's existing MCP 2.0 support did not include this built-in server entry point. The server comes with tools to call_agent, start_workflow and get_trace, which configured coding agents or connected MCP clients use to call agents, run workflows and tools, and read memory or traces.

Setup means installing @mastra/mcp and configuring an auth provider on the main Mastra instance, after which the server is exposed at <server-url>/api/mcp. Requests typically require a bearer token verified by the configured auth provider; in production, if no auth provider is configured, Mastra will not expose the MCP server, and enabled: true can override this. Each MCP tool call uses the same server routes as standard HTTP requests and goes through the same RBAC and FGA checks if configured; toolsets, include and exclude let you choose which agents, workflows or tools are exposed.

Perspective

The release targets developers with a deployed Mastra project who want to connect MCP clients; the demonstrated client is Claude Code, configured with mcp add plus the server URL and an authorization token.

In production, the server is not exposed when no auth provider is configured, and enabled: true is needed to override that; requests typically require a bearer token verified by the auth provider.