MCP Shield logo

MCP Shield

by muhannad-hash

Scans npm packages and local MCP servers for malicious code, prompt injection, and supply-chain risks.

Install MCP Shield

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "muhannad-hash-mcp-shield": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-shield"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The muhannad-hash/mcp-shield MCP server scans npm packages and local MCP server directories for malicious patterns before installation. It also checks tool descriptions or responses for prompt injection and audits npm package trust indicators, dependency CVEs, maintainers, and age. npm packages are installed with scripts disabled during analysis, while JavaScript and TypeScript files are checked against attack signatures. Reach for it when reviewing an unfamiliar MCP server, package, or tool response before allowing access to sensitive context or credentials.

Use cases

  • Scan an npm MCP package before installing it
  • Inspect a cloned MCP server directory
  • Check tool descriptions for prompt injection
  • Audit an npm package's supply-chain trust

Key features

  • Scans npm packages with installation scripts disabled
  • Analyzes local JavaScript and TypeScript directories
  • Detects exfiltration and dangerous code execution patterns
  • Checks tool text and responses for prompt injection
  • Reports npm metadata, CVEs, and trust indicators

Tools4

What MCP Shield lets your agent do. Expand a tool for its parameters.

Self-reported~79 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

8/8 checks healthy over the last 91d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · mcp-shield (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads414Package downloads in the last 30 days.
Last commit7mo agoMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Shield works

What muhannad-hash/mcp-shield MCP server does

The muhannad-hash/mcp-shield MCP server reviews MCP server code and package metadata for security risks. It can analyze an npm package before installation, inspect a local directory such as a GitHub clone, look for prompt injection in text, and report supply-chain information for an npm package.

The scanner covers possible credential or data exfiltration, shell and dynamic code execution, obfuscation, access to sensitive files, and LLM-targeting instructions. Examples include reads of environment variables, SSH keys, AWS credentials, .env files, browser cookies, or ~/.gitconfig; network transmission of sensitive data; eval(), dynamic require(), and child-process execution; and hidden or zero-width prompt instructions.

How it works

For source analysis, muhannad-hash/mcp-shield MCP server examines JavaScript and TypeScript files with regular-expression signatures. Findings include severity, category-specific identifiers, source location, and the relevant code where available.

Package analysis uses an installation step configured with --ignore-scripts, preventing package lifecycle scripts from running while the package is being examined. This is intended to avoid executing malicious postinstall hooks during the scan.

Supply-chain checks query npm package metadata and run npm audit against the dependency tree. Results can include package age, weekly downloads, maintainer count, trust score, and known CVEs. Prompt-injection checks inspect tool descriptions or responses for hidden instructions, role changes, jailbreak patterns, zero-width characters, and related techniques.

Setup and configuration

The documented no-install option adds the server to Claude with npx:

Terminal
claude mcp add mcp-shield -- npx mcp-shield

You can instead install it globally and register the executable:

Terminal
npm install -g mcp-shield
claude mcp add mcp-shield -- mcp-shield

Manual Claude configuration places an mcp-shield entry in ~/.claude/claude_mcp_config.json, using npx as the command and mcp-shield as its argument. Development instructions use a cloned repository, npm install, and npm run dev. No environment variables are documented.

Tools and capabilities

The muhannad-hash/mcp-shield MCP server exposes four tools:

  • scan_package downloads an npm MCP package and scans it for malicious patterns.
  • scan_directory examines a local MCP server directory, including one cloned from GitHub.
  • audit_supply_chain retrieves an npm package trust score, CVEs, maintainer count, and age.

Use prompts such as asking to scan an npm package before installation, inspect a local project directory, evaluate pasted tool text, or audit installed MCP servers.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Shield

muhannad-hash/mcp-shield is an MCP server that connects to npm packages and local MCP server directories for security analysis. Its main tools scan packages, scan directories, check tool descriptions or responses for prompt injection, and audit npm supply-chain data such as CVEs, maintainers, package age, and trust score.

Install it by adding `claude mcp add mcp-shield -- npx mcp-shield` to Claude, or install it globally with `npm install -g mcp-shield` and register `mcp-shield` as the command.

It scans for exfiltration, dangerous code execution, obfuscation, sensitive file access, prompt injection, and supply-chain risks. Examples include credential reads, network transmission of environment data, shell execution, runtime Base64 decoding, hidden instructions, dependency CVEs, package age, download activity, and maintainer count.

It describes the server as an MCP server using a command-based launch, but no Cursor-specific configuration or compatibility statement is provided.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Shield AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/muhannad-hash-mcp-shield?style=directory)](https://allmcps.com/mcp/muhannad-hash-mcp-shield)
HTML Embed
<a href="https://allmcps.com/mcp/muhannad-hash-mcp-shield"><img src="https://allmcps.com/api/badge/muhannad-hash-mcp-shield?style=directory" alt="MCP Shield on AllMCPs" /></a>