SuperAPIAI Directory

mcp-shield

github.com · AI coding

Pre-install security scanner for MCP servers: detects backdoors, exfiltration code, obfuscation, dangerous execution, prompt injection and supply chain risks.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

mcp-shield is a security scanner for MCP (Model Context Protocol) servers, with the goal of discovering potential threats before an MCP server comes into contact with AI. As the MCP ecosystem develops rapidly, not all servers on npm are safe, and mcp-shield allows Claude to audit local servers or servers from npm before trusting an MCP server with access to files, secrets, and context.

Main capabilities include:

  1. Static analysis: scans JavaScript/TypeScript source files, using a regex pattern library covering 5 major categories and more than 20 attack signatures, to detect backdoors, data exfiltration code, obfuscation, and dangerous execution, etc.

  2. Supply chain audit: queries the npm registry to obtain package metadata, and runs npm audit to discover known CVE vulnerabilities in the dependency tree.

  3. Prompt injection detection: checks tool descriptions and responses for zero-width characters, instruction override, role-switching attacks, and other techniques targeting LLMs.

  4. Safe installation: when scanning npm packages, installs with --ignore-scripts to ensure malicious postinstall hooks are not executed during analysis.

Usage offers three options:

  • Option 1: npx (no installation required)
  • Option 2: global installation
  • Option 3: manual configuration, adding the configuration to ~/.claude/claude_mcp_config.json

The project welcomes PRs, detection patterns are located in src/patterns.ts, and adding a new signature only requires adding one object.

Applicable scenarios: security review before connecting any MCP server to an AI assistant (such as Claude), especially suitable for developers who need to evaluate the security of third-party npm packages or local servers.

Limitations: the material does not provide specific detection accuracy, the range of supported MCP server types, performance data, or pricing information; these contents are not yet provided.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools