@mastra/gcs
@mastra/gcs mounts a Google Cloud Storage bucket as the filesystem for a Mastra workspace. Use it when agents need durable, shared file access across processes or deployments instead of a local filesystem.
Installation
npm install @mastra/gcs
Usage
import { Agent } from '@mastra/core/agent';
import { Workspace } from '@mastra/core/workspace';
import { GCSFilesystem } from '@mastra/gcs';
const workspace = new Workspace({
filesystem: new GCSFilesystem({
bucket: 'my-gcs-bucket',
projectId: 'my-project-id',
credentials: JSON.parse(process.env.GCS_SERVICE_ACCOUNT_KEY),
}),
});
const agent = new Agent({
name: 'my-agent',
model: 'anthropic/claude-opus-4-5',
workspace,
});
Documentation
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.