Skip to main content
SkillTotal

Is @ai-sdk/mcp safe?

No malicious indicators - review capabilities before installing
Notable — review in context (a capability is not a malicious indicator):
  • Node.js shell/command execution
  • Delegated authentication (OAuth 2.0 / OIDC)

What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.

@ai-sdk/mcp is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: delegated authentication and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).

@ai-sdk/mcp 2.0.99

npm package · npm:@ai-sdk/mcp
LOW
0
/ 100 risk score
Snapshot · scanned Nov 13, 2026 · @ai-sdk/mcp@2.0.99 · engine 1.1.0 / ruleset 100

Get notified when this component changes

Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.

Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @ai-sdk/mcp's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
delegated authenticationshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Execution authority
Tool Access Control / Direct Tool Access
Delegated authentication
Tool Execution Context / User Delegated Credentials

Findings (2)

CapabilityNode.js shell/command executionnot scored · severity highST-SHELL-NODE

The component can run operating-system commands or spawn processes.

import { IOType } from "node:child_process";
import spawn from "cross-spawn";
import type { ChildProcess } from 'node:child_process';
import spawn from 'cross-spawn';
return spawn(config.command, config.args ?? [], {
import type { ChildProcess, IOType } from 'node:child_process';

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.

CapabilityDelegated authentication (OAuth 2.0 / OIDC)not scored · severity lowST-AUTH-DELEGATED

An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (17 occurrence(s) shown as evidence).

id_token: z.ZodOptional<z.ZodString>;
authorization_endpoint: z.ZodString;
authorization_endpoint: z.ZodString;
id_token: z.string().optional(),
authorization_endpoint: SafeUrlSchema,
authorization_endpoint: SafeUrlSchema,
url: new URL("/.well-known/openid-configuration", url.origin),
url: new URL(`/.well-known/openid-configuration${pathname}`, url.origin),
oidcDiscoveryUrl.pathname = `${pathname}/.well-known/openid-configuration`;
authorizationUrl = new URL(metadata.authorization_endpoint);
id_token: z.string().optional(), // Optional for OAuth 2.1, but necessary in OpenID Connect
authorization_endpoint: SafeUrlSchema,
authorization_endpoint: SafeUrlSchema,
url: new URL('/.well-known/openid-configuration', url.origin),
url: new URL(`/.well-known/openid-configuration${pathname}`, url.origin),
oidcDiscoveryUrl.pathname = `${pathname}/.well-known/openid-configuration`;
authorizationUrl = new URL(metadata.authorization_endpoint);

Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in @ai-sdk/mcp.

Maintain @ai-sdk/mcp?

Check the next package before your agent installs it

The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.

Check your own component

Run the same evidence-backed scan on any MCP server, agent skill, or package.

Scan your own component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →