# NPM Vulnerability Scanner

> NPM Vulnerability Scanner is a paid API for AI agents from mcp-gateway.agentdiet.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Scans an npm package for known security vulnerabilities and returns a risk report

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/npm-vuln-scan?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-vulnerability-scanner-b7d82653
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LWm0fxEo7W374rzfjhecq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability npm-vulnerability-scanner-b7d82653
```

Example prompt: Can you scan the npm package 'lodash' for known security vulnerabilities and tell me if it's safe to use?

## When to prefer this

Use this endpoint when an AI agent needs a quick, cheap ($0.01 USDC) programmatic vulnerability check on a specific npm package without standing up a full Snyk or npm audit pipeline. Ideal for lightweight dependency vetting in automated agent workflows, CI decision gates, or one-off security checks where a full audit tool is overkill.

## Known failure modes

- Missing 'package' query parameter returns an error or empty result
- Unknown or misspelled package name may return no vulnerability data
- Upstream vulnerability database unavailable causes lookup failure
- Payment failure (x402) prevents endpoint access
- Rate limiting or quota exhaustion returns 402 or 429 error

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with a status field, a data object containing vulnerability findings for the queried npm package, and an roi_proof object showing a compression ratio metric (e.g. compression_ratio_pct: 91.4) indicating how much raw data was distilled.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "package": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-vulnerability-scanner-b7d82653/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-gateway.agentdiet.dev](https://www.zero.xyz/host/mcp-gateway.agentdiet.dev/llms.txt)
