Mastra Deploy

Mastra Deployment and Server guide - server adapters, authentication, middleware, client SDK, cloud providers, and production deployment. Covers registerApiRoute custom endpoints, server middleware, CORS config, MastraClient calls from Next.js/React frontends, auth providers, and cloud/serverless targets (Vercel, Cloudflare, AWS, Azure).

artsmc Updated

File contents

Mastra Deployment and Server Configuration

Comprehensive guide for deploying Mastra applications. Covers MastraServer with adapter packages (@mastra/express, @mastra/hono, @mastra/fastify, @mastra/koa), authentication providers, custom API routes, middleware, MastraClient SDK, and cloud deployment (Vercel, Cloudflare, Netlify, AWS, Azure, Digital Ocean).

Usage

/mastra-deploy

Provides context for:

  • MastraServer from adapter packages (not createServer)
  • Server adapters: Express, Hono, Fastify, Koa
  • Auth: MastraAuthBetterAuth, MastraAuthClerk, MastraAuthSupabase
  • registerApiRoute() with Hono-style context
  • MastraClient SDK (getAgent(), getWorkflow())
  • Cloud deployers: VercelDeployer, CloudflareDeployer, NetlifyDeployer
  • Middleware and request context patterns

artsmc/claude-dev-agents/tree/main/skills/mastra-deploy commit bab1dd05bb

Frequently asked questions

npx skillmds@latest add artsmc-claude-dev-agents/mastra-deploy