New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@mastra/deployer-cloud

Package Overview
Dependencies
Maintainers
7
Versions
1038
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mastra AI framework compromise" supply chain attack.

Affected versions:

1.42.1
View campaign page

@mastra/deployer-cloud

latest
Source
npmnpm
Version
1.67.0
Version published
Weekly downloads
1K
-69.21%
Maintainers
7
Weekly downloads
 
Created
Source

@mastra/deployer-cloud

A cloud-optimized deployer for Mastra applications with built-in logging, storage, instrumentation, and server entry-point generation.

Installation

npm install @mastra/deployer-cloud

Usage

The cloud deployer is used as part of the Mastra build process:

import { CloudDeployer } from '@mastra/deployer-cloud';

const deployer = new CloudDeployer({ studio: false });

await deployer.bundle('./src/mastra', './.mastra/output');

Documentation

CloudDeployer creates the server bundle used by Mastra Cloud. It discovers the Mastra entry file and tools, generates a production server entry point, keeps npm dependencies external, writes the deployment package manifest, and installs the resulting dependencies into the output directory.

The generated server combines the application's logger with a cloud PinoLogger, sends logs to BUSINESS_API_RUNNER_LOGS_ENDPOINT when configured, and emits structured readiness events containing the deployment team, project, and build identifiers. When MASTRA_STORAGE_URL and MASTRA_STORAGE_AUTH_TOKEN are present, it initializes Mastra Cloud LibSQL storage; otherwise it initializes the storage configured by the application.

Studio is excluded by default. Pass new CloudDeployer({ studio: true }) to copy and serve the Studio assets with the deployed server. The generated server disables Swagger UI, exposes discovered tools, registers internal trace-scoring support when storage is available, and applies the cloud authentication entry point.

Common runtime variables include:

  • MASTRA_STORAGE_URL and MASTRA_STORAGE_AUTH_TOKEN for managed storage.
  • BUSINESS_API_RUNNER_LOGS_ENDPOINT and BUSINESS_JWT_TOKEN for cloud log transport.
  • RUNNER_START_TIME, TEAM_ID, PROJECT_ID, and BUILD_ID for readiness and deployment metadata.
  • CI=true to disable the remote log transport during CI builds.

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

FAQs

Package last updated on 15 Sep 2026

Related posts