# @buildwithabid/mcp-shield [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/BuildWithAbid/mcp-shield  
**GitHub Stars:** 2  
**npm Downloads (last month):** 129  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/buildwithabid-mcp-shield

## Description
Security scanner for MCP servers. Find vulnerabilities before your AI agent does.

## Tools
Capabilities this server exposes over MCP:

- **scan_package** — Scan an npm MCP server package by name (package scan)
- **scan_local** — Scan a local directory for security issues (local scan)
- **get_report** — Get the last scan report (JSON, Markdown, or terminal format)

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-shield": {
    "command": "npx",
    "args": ["-y","@buildwithabid/mcp-shield"]
  }
}
```

## Documentation

## What @buildwithabid/mcp-shield does

@buildwithabid/mcp-shield is a security scanner for MCP servers. It accepts either an npm package name or a local directory and evaluates source, configuration, package metadata, and dependency information. The result is a scored report that groups findings by severity and identifies passed checks as well as issues.

Seven check areas are covered:

- Dependency auditing through `npm audit`, including direct and transitive dependency CVEs.
- Permission and scope analysis for unrestricted shell commands, file paths, URLs, raw SQL, dynamic code execution, and `child_process` access.
- Tool-description injection detection, including hidden instructions, role changes, encoded payloads, Unicode tricks, and exfiltration patterns.
- Rug-pull detection for tool descriptions that can change after approval.
- Secret discovery in source files and `.env` files.
- Transport checks for insecure HTTP, permissive CORS, exposed credentials, disabled TLS verification, and unprotected sensitive routes.
- npm supply-chain analysis, including typosquatting, maintainer risk, lifecycle scripts, package naming, and repository metadata.

## How it works

The CLI determines the scan type from the target. Names that are not paths are resolved through npm; targets beginning with `.`, `/`, or `~`, along with absolute paths, are treated as local directories. Relative paths use the current working directory, while a leading tilde expands to the home directory.

Scans inspect JavaScript and TypeScript, several configuration formats, environment files, shell scripts, and source files from languages including Python, Ruby, Go, Rust, Java, Kotlin, C#, PHP, and Terraform. Common generated, dependency, cache, and version-control directories are excluded. Package scans also query npm metadata and inspect package lifecycle scripts before installation.

## Setup and configuration

Run a scan without a global installation:

```bash
npx @buildwithabid/mcp-shield scan @some/mcp-server
npx @buildwithabid/mcp-shield scan ./my-mcp-server
```

Install globally with npm if preferred:

```bash
npm install -g @buildwithabid/mcp-shield
```

The CLI supports terminal output by default, plus JSON and Markdown formats. Use `--output` to save a report, and `--quick` to skip slower checks such as rug-pull detection. Node.js 18, 20, or 22 and newer are supported.

To expose the scanner to an MCP client, start its stdio server:

```bash
npx @buildwithabid/mcp-shield serve
```

Claude Code can register it with `claude mcp add mcp-shield -- npx @buildwithabid/mcp-shield serve`.

## Tools and capabilities

In MCP server mode, `scan_package` scans an npm MCP package by name, `scan_local` examines a directory on disk, and `get_report` returns the most recent report as JSON, Markdown, or terminal-formatted output. The CLI offers equivalent package and local scans with selectable output formats.

Supply-chain checks can flag recently published packages as informational findings, detect package names close to known MCP packages, identify packages with a single maintainer, and report suspicious install scripts or scripts that download remote code. Secret checks recognize common cloud, API, messaging, database, JWT, private-key, password, token, and secret patterns while ignoring common placeholder values.

## Limitations and notes

Quick scans omit slower checks, including rug-pull detection. Local and package scans skip dependency, version-control, cache, virtual-environment, coverage, and test-cache directories; local scans also skip common build-output directories. Package scans inspect downloaded npm content and metadata, while local scans operate on the path supplied to the command. The MCP server uses stdio transport.

_Full upstream README: https://allmcps.com/mcp/buildwithabid-mcp-shield/readme_

