npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cyberranger/mcp-threat-lab

v0.1.0

Published

A safe local red-team and readiness lab for Model Context Protocol security.

Readme

MCP Threat Lab

CI Node.js License: MIT

A safe local red-team and readiness lab for MCP security.

MCP Threat Lab gives AI platform, security, and developer-tools teams a repeatable way to test whether their Model Context Protocol controls would stop common agent attack patterns before those tools become trusted execution paths.

It is designed as the offensive companion to MCP Guardian:

  • MCP Guardian: scanner, firewall, audit layer, and CI guardrail.
  • MCP Threat Lab: safe attack cards, readiness checks, and reports.

Why This Exists

Agents are getting connected to local files, shell commands, browsers, APIs, and credential-bearing developer environments. MCP makes that powerful, but it also creates a new trust boundary around every server, tool schema, and tool result.

MCP Threat Lab turns that problem into concrete attack cards and control checks:

  • Could prompt injection make the agent reveal secrets?
  • Could a tool description poison the agent plan?
  • Could over-broad filesystem scope expose credentials?
  • Could a shell-like tool execute model-controlled input?
  • Could a shadow MCP server enter a developer config without review?
  • Would an incident leave useful audit evidence?

The lab is safe by default. It does not execute payloads. It evaluates whether the controls that should block each pattern are present.

Install

npm install
npm run build
npm install -g @cyberranger/mcp-threat-lab

Or run without installing:

npm exec --package=@cyberranger/mcp-threat-lab -- mcp-threat-lab --help

Quick Start

# List attack cards
node dist/cli.js list

# View a specific card
node dist/cli.js card MCP-TL-004

# Run the starter profile and fail on high-risk gaps
node dist/cli.js run --profile starter --fail-on high

# Generate a markdown report for a hardened stack
node dist/cli.js run --profile hardened --format markdown --output report.md

Configuration

Create a profile:

node dist/cli.js init --profile starter

Example:

{
  "name": "starter-agent-stack",
  "controls": {
    "secretRedaction": false,
    "leastPrivilegeScopes": false,
    "toolSchemaPinning": false,
    "commandAllowlist": false,
    "auditLog": true,
    "serverInventory": false,
    "contextIsolation": false,
    "humanApprovalForDangerousTools": false
  }
}

Run against the config:

node dist/cli.js run --config .mcp-threat-lab.json --format markdown --output report.md

Attack Cards

| ID | Severity | Category | Title | | --- | --- | --- | --- | | MCP-TL-001 | critical | prompt-injection | Prompt-borne secret exfiltration | | MCP-TL-002 | high | tool-poisoning | Tool description poisoning | | MCP-TL-003 | high | least-privilege | Over-broad filesystem scope | | MCP-TL-004 | critical | command-execution | Command execution escalation | | MCP-TL-005 | high | inventory | Shadow MCP server adoption | | MCP-TL-006 | medium | observability | Silent audit failure |

Commands

mcp-threat-lab init [--profile starter|hardened] [--output .mcp-threat-lab.json] [--force]
mcp-threat-lab list
mcp-threat-lab card <id>
mcp-threat-lab run [--config .mcp-threat-lab.json] [--profile starter|hardened]
                   [--format text|json|markdown] [--include category-or-id]
                   [--fail-on low|medium|high|critical] [--output report.md]

Development

npm install
npm run check
npm run dev -- list

Documentation

Safety

This is a defensive security lab. Payloads are represented as safe prompts and test cases. The CLI does not run shell payloads, access secrets, scan private directories, or attack live services.