Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@nest-mcp/core

Latest version: v2.0.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: kauandotnet, leoafarias
7 Stars
5 Forks
3 Versions
TypeScript Repo language

Scan summary

@nest-mcp/core was last scanned on 30 Nov 2026 at version 2.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published on 30 Nov 2026.
  • Findings: No rules fired in version 2.0.0.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.0.0 LATEST 30 Nov 2026 No rules fired
2.0.0-alpha.0 30 Nov 2026 No rules fired
0.0.0-stage 30 Nov 2026 Not shown

No rules fired in 2.0.0

Findings

Findings for v2.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@nest-mcp/core

Framework-neutral runtime primitives for building MCP clients, servers, gateways, and NestJS adapters. This package deliberately has no dependency on NestJS or an MCP SDK; adapters translate their SDK-specific calls into these stable operation primitives.

What it provides

  • Immutable operation context and metadata with correlation, cancellation, principal, and attribute propagation.
  • Onion-style middleware composition with concurrent invocation safety and a guard against calling next() twice.
  • Result-opaque passthrough middleware for observers that must preserve the exact downstream value.
  • Explicit allow/deny authorization decisions, fail-closed enforcement, and reusable authorization middleware.
  • Structured started, succeeded, failed, and cancelled lifecycle events.
  • Best-effort telemetry middleware that never replaces the operation result or its primary error.
  • Observer fan-out that attempts every observer and reports aggregate failures.

Installation

pnpm add @nest-mcp/core

Compose an operation pipeline

import {
    allowMcpOperation,
    composeMcpLifecycleObservers,
    composeMcpMiddleware,
    createMcpAuthorizationMiddleware,
    createMcpLifecycleMiddleware,
    createMcpOperation,
    createMcpOperationContext,
    type McpAuthorizationPolicy,
} from "@nest-mcp/core";

const telemetry = composeMcpLifecycleObservers([
    {
        onEvent(event) {
            console.info(event.type, event.context.operationId);
        },
    },
]);

const policy: McpAuthorizationPolicy<{ tool: string }> = {
    authorize(operation) {
        return operation.context.principal === undefined
            ? { effect: "deny", reason: "Authentication is required.", attributes: {} }
            : allowMcpOperation({ policy: "authenticated-tools" });
    },
};

const execute = composeMcpMiddleware(
    [
        createMcpLifecycleMiddleware(telemetry, {
            onObserverError(error) {
                console.error("Telemetry failed", error);
            },
        }),
        createMcpAuthorizationMiddleware(policy),
    ],
    async ({ input }) => ({ content: `Called ${input.tool}` }),
);

const context = createMcpOperationContext({
    operationId: crypto.randomUUID(),
    role: "gateway",
    operation: {
        name: "tools/call",
        kind: "request",
        capability: "tools",
        target: "weather-server",
    },
    principal: { subject: "user-123" },
});

const result = await execute(createMcpOperation({ tool: "weather" }, context));

Middleware is entered from left to right and unwinds from right to left. A middleware continuation may be called at most once. Keep lifecycle middleware outside authorization middleware when denied attempts should produce failure telemetry.

For logging, tracing, rate limits, and similar concerns that should never transform a protocol result, wrap a result-opaque callback with createMcpPassthroughMiddleware. Its next() resolves to void; the adapter retains and returns the exact downstream value, requires the callback to continue, and does not allow a swallowed downstream failure to become a successful result.

Authorization is fail closed

enforceMcpAuthorization returns only an explicit, structurally valid allow decision. It raises McpAuthorizationError when:

  • no policy is configured;
  • the policy throws or rejects;
  • the policy returns a malformed value; or
  • the policy explicitly denies the operation.

The error has the stable code MCP_AUTHORIZATION_DENIED, a failure classification, the operation ID, and the deny decision. Policy exceptions are retained as the error cause but are not included in the public error message.

Lifecycle and telemetry behavior

Lifecycle events contain context, timestamps, duration, and sanitized error details. They intentionally do not contain operation inputs or outputs, which reduces accidental payload or credential leakage.

The lifecycle middleware treats observers as best-effort: observer failures may be routed to onObserverError, but neither observer nor observer-error-handler failures replace an operation result or its primary error. composeMcpLifecycleObservers itself surfaces failures after attempting every observer, allowing it to remain useful outside the middleware.

Entry points

  • @nest-mcp/core
  • @nest-mcp/core/operation
  • @nest-mcp/core/middleware
  • @nest-mcp/core/authorization
  • @nest-mcp/core/lifecycle

License

BSD-3-Clause

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @nest-mcp/core

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229