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

mcp-security

v0.1.0

Published

Security scanner for MCP (Model Context Protocol) servers

Readme

mcp-security

Security scanner for MCP (Model Context Protocol) servers. Think of it as npm audit for AI agents.

Installation

npm install -g mcp-security

Or run directly:

npx mcp-security

Usage

Basic Scan

# Auto-detect and scan MCP configs
mcp-security scan

# Scan specific config
mcp-security scan ./path/to/mcp.json
mcp-security scan ~/.cursor/mcp.json

Output Formats

# Terminal output (default)
mcp-security scan

# JSON output (for scripting)
mcp-security scan --json

# SARIF output (for GitHub Actions)
mcp-security scan --sarif > results.sarif

CI/CD Integration

# .github/workflows/security.yml
name: MCP Security Scan

on: [push, pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Run MCP Security Scan
        run: npx mcp-security scan --sarif > results.sarif
        
      - name: Upload SARIF
        uses: github/codeql-action/upload-sarif@v2
        with:
          sarif_file: results.sarif

Detection Rules

Prompt Injection (PI001-PI003)

Detects attempts to manipulate LLM behavior through tool descriptions:

  • "ignore previous instructions"
  • "override all instructions"
  • Base64 encoded payloads
  • Hidden commands in code blocks
  • Unusually long descriptions

Tool Shadowing (TS001-TS002)

Identifies dangerous tool names that could shadow built-ins:

  • read_file, write_file, execute
  • shell, bash, eval
  • Name conflicts between servers

Config Exposure (CE001-CE004)

Finds exposed secrets in configuration:

  • OpenAI, Anthropic, AWS API keys
  • GitHub tokens
  • Hardcoded passwords in args or env

Excessive Permissions (EP001-EP005)

Detects overly permissive configurations:

  • Root filesystem access ("/")
  • sudo in commands
  • Unrestricted network bindings

Exit Codes

| Code | Meaning | |------|---------| | 0 | No issues (or only low severity) | | 1 | High or medium severity findings | | 2 | Scanner error |

Config Locations

Auto-detected config files:

| Application | Path | |------------|------| | Cursor | ~/.cursor/mcp.json, ./.cursor/mcp.json | | Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json | | Claude Desktop (Linux) | ~/.config/claude/claude_desktop_config.json | | VS Code | ~/.vscode/mcp.json, ./.vscode/mcp.json | | Generic | ./mcp.json, ./.mcp/config.json |

Example Output

🔍 MCP Security Scanner v0.1.0
   2026-02-18T12:00:00.000Z

Scanning: ~/.cursor/mcp.json
Servers:  2

   ✓ filesystem (3 tools) — No issues
   ⚠ custom-tools (2 tools) — 1 findings

Findings:

🔴 HIGH: Potential prompt injection in tool description
   Server: custom-tools
   Tool: process_data
   Pattern: Attempts to override previous instructions
   Found: "ignore all previous instructions"
   → Review and remove suspicious instructions from tool description

Summary:
   1 high · 0 medium · 0 low

License

MIT

Contributing

Issues and PRs welcome at GitHub.