
Security News
npm v12 Ships With Install Scripts Off by Default, Begins Deprecating 2FA-Bypass Tokens
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.
@mastra/server
Advanced tools
Affected versions:
Typed HTTP handlers and utilities for exposing a Mastra instance over HTTP.
This package powers mastra dev and can be added to your own server to provide
REST and streaming endpoints for agents, workflows, telemetry and more.
npm install @mastra/server
The handlers are framework agnostic functions which accept a Mastra instance
and a request context. They are typically mounted under a URL prefix within your
web framework of choice:
import { Hono } from 'hono';
import { handlers } from '@mastra/server';
import { mastra } from './mastra-instance';
const app = new Hono();
app.get('/mastra/agents', ctx => handlers.agents.listAgentsHandler({ mastra, requestContext: ctx }));
app.post('/mastra/agents/:id/generate', async ctx => {
const body = await ctx.req.json();
return handlers.agents.generateHandler({
mastra,
requestContext: ctx,
agentId: ctx.req.param('id'),
body,
});
});
// Mount additional handlers as required
Running mastra dev starts a local development UI at
http://localhost:3000 using these handlers.
generate
or stream.Mastra instance.Handlers return JSON serialisable data and throw an HTTPException (subclass of
Error) when a failure should result in a non-2xx HTTP status.
The local OpenAPI specification used by the CLI playground and similar tools can be refreshed by running:
pnpm run pull:openapispec
within the @mastra/server directory.
FAQs
Unknown package
The npm package @mastra/server receives a total of 338,686 weekly downloads. As such, @mastra/server popularity was classified as popular.
We found that @mastra/server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.