AgentShield MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add agent-shield -- npx -y @elliotllliu/agent-shield scan ./path/to/target
README.md

Full-stack security for AI agents โ€” static analysis + MCP runtime interception.

๐Ÿ›ก๏ธ AgentShield

Give your AI a health check.

One scan. Thirteen engines. One report.

ไธญๆ–‡ๆ–‡ๆกฃ

You found an MCP Server / Skill / Plugin online and want to install it. But you're wondering:

Is this thing safe? Will it steal my API keys? Hijack my AI? Mine crypto?

AgentShield answers that in seconds. One command, 13 independent scanning engines, one clear report.

npx @elliotllliu/agent-shield scan ./that-thing-you-want-to-install

That's it. First run auto-installs all engines. After that, results come in seconds.


See It In Action

๐Ÿ›ก๏ธ  ๅฎ‰ๅ…จๆฃ€ๆต‹ๆŠฅๅ‘Š
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐Ÿ“ ๆฃ€ๆต‹ๅฏน่ฑก:  ./mcp-puppeteer
๐Ÿ”ง ๆฃ€ๆต‹ๅผ•ๆ“Ž:  13 ไธช็‹ฌ็ซ‹ๆ‰ซๆๅ™จ
โฑ  ๆ€ป่€—ๆ—ถ:    50.2s

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ” ๅ„ๆ–นๆฃ€ๆต‹็ป“่ฎบ
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

๐Ÿ“‹ AgentShield โ€” ๅ†…็ฝฎๅ‚่€ƒ๏ผˆAI Agent ๅŸบ็ก€ๆฃ€ๆŸฅ๏ผ‰
   ็ป“่ฎบ: โš ๏ธ ๅ‘็Žฐ 1 ๅค„้œ€ๅ…ณๆณจ
   โ€ข ไปฃ็ ๆททๆท†  ๐Ÿ“ src/index.ts:1

๐Ÿ” Aguara โ€” ้€š็”จไปฃ็ ๅฎ‰ๅ…จ
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

๐Ÿ”Ž Semgrep โ€” ไปฃ็ ่ดจ้‡ไธŽๆณจๅ…ฅๆฃ€ๆต‹
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

๐Ÿงช Invariant โ€” MCP Tool Poisoning ๆฃ€ๆต‹
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

๐Ÿ”ฌ Trivy โ€” ๆผๆดžๆ‰ซๆ + ๅฏ†้’ฅๆฃ€ๆต‹
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

๐Ÿ”‘ Gitleaks โ€” ๅฏ†้’ฅๅ’Œ Token ๆณ„้œฒ
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

๐Ÿ Bandit โ€” Python ไปฃ็ ๅฎ‰ๅ…จ
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

๐Ÿ“ก Bearer โ€” ๆ•ฐๆฎๆต + ้š็งๅˆ†ๆž
   ็ป“่ฎบ: โœ… ๆœชๅ‘็Žฐ้ฃŽ้™ฉ

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ“Š ็ปผๅˆ็ป“่ฎบ
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

โœ… ๆ‰€ๆœ‰ๅผ•ๆ“Žๅ‡ๆœชๆฃ€ๅ‡บ้ฃŽ้™ฉ
   ๏ผˆ7/7 ไธชๅค–้ƒจๅผ•ๆ“Žๆœชๆฃ€ๅ‡บ้ฃŽ้™ฉ๏ผ‰

  โœ… ๅŽ้—จ/่ฟœ็จ‹ๆŽงๅˆถ  โ€” 7 ไธชๅผ•ๆ“Žๅ‡ๆœชๆฃ€ๅ‡บ
  โœ… ๆ•ฐๆฎ็ชƒๅ–       โ€” 7 ไธชๅผ•ๆ“Žๅ‡ๆœชๆฃ€ๅ‡บ
  โœ… Prompt ๆณจๅ…ฅ    โ€” 7 ไธชๅผ•ๆ“Žๅ‡ๆœชๆฃ€ๅ‡บ
  โœ… ๆŒ–็Ÿฟ่กŒไธบ       โ€” 7 ไธชๅผ•ๆ“Žๅ‡ๆœชๆฃ€ๅ‡บ

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

One glance: 7 out of 7 external engines say it's clean. All major threats cleared. Safe to install.


Why Trust It?

Because it's not one engine making the call. It's 13 independent scanning engines, each a specialist in their own domain. We bring them together:

Engine What it's best at
๐Ÿ“‹ AgentShield (reference) AI Agent basics โ€” skill hijack, prompt injection, MCP runtime
๐Ÿ” Aguara General security โ€” 177 rules, data exfil, taint tracking
๐Ÿ”Ž Semgrep Code quality โ€” 2000+ rules, injection, XSS, hardcoded secrets
๐Ÿงช Invariant MCP-specific โ€” tool poisoning, cross-origin escalation, rug pull
๐Ÿ”ฌ Trivy Vulnerability scan + secret detection + SBOM
๐Ÿ”‘ Gitleaks Secret and token leak detection
๐Ÿ Bandit Python code security
๐Ÿ“ก Bearer Data flow + privacy analysis
๐Ÿ• TruffleHog Secret detection + verification if active
๐ŸŒ OSV-Scanner Dependency vulnerabilities (Google OSV database)
๐Ÿฆ‘ Grype Dependency vulnerability scanning
๐ŸŸข njsscan Node.js / JavaScript security
๐Ÿ” detect-secrets Secret detection (Yelp)

Each engine has its own strengths. We combine all of them into one report.

The built-in engine is reference-only โ€” the overall conclusion is decided by the 7 external engines' consensus. The stronger they get, the stronger we get.


First Run

First time you run it, engines are auto-installed (to ~/.agentshield/, no sudo needed):

๐Ÿ”ง ๆฃ€ๆŸฅๅผ•ๆ“Ž...
  โœ… AgentShield โ€” ๅทฒๅฐฑ็ปช
  ๐Ÿ“ฆ Aguara โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ
  ๐Ÿ“ฆ Semgrep โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ
  ๐Ÿ“ฆ Invariant โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ
  ๐Ÿ“ฆ Trivy โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ
  ๐Ÿ“ฆ Gitleaks โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ
  ๐Ÿ“ฆ Bandit โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ
  ๐Ÿ“ฆ Bearer โ€” ๆญฃๅœจๅฎ‰่ฃ…... ๅฎŒๆˆ

One-time setup. After that, it's instant.


What Can It Detect?

Risk What it means
๐Ÿ”ด Skill Hijack It's secretly modifying your AI's config
๐Ÿ”ด Backdoor It can silently execute arbitrary code
๐Ÿ”ด Remote Control It's connecting to external servers + opening a shell
โš ๏ธ Data Theft It reads your keys/files and sends them out
โš ๏ธ Prompt Injection It's secretly adding instructions to your AI
โš ๏ธ Tool Poisoning Hidden malicious instructions in tool descriptions
โš ๏ธ Obfuscated Code Code is intentionally unreadable โ€” might be hiding something
โš ๏ธ Vulnerabilities Known CVEs in dependencies
โš ๏ธ Secret Leaks API keys, tokens, passwords in source code
โ„น๏ธ Excessive Permissions It asks for more than it needs

More Options

# HTML report (shareable)
agent-shield scan ./dir --html -o report.html

# JSON (for CI/CD)
agent-shield scan ./dir --json

# Chinese report (default)
agent-shield scan ./dir --lang zh

# SARIF (GitHub Code Scanning)
agent-shield scan ./dir --sarif -o results.sarif

Install

# Recommended: use npx, nothing to install
npx @elliotllliu/agent-shield scan ./my-skill/

Configuration

claude_desktop_config.json
{"mcpServers": {"agent-shield": {"command": "npx", "args": ["-y", "@elliotllliu/agent-shield", "scan", "./path/to/target"]}}}

Try it

โ†’Scan the local directory ./my-new-mcp-server for security vulnerabilities.
โ†’Run a security audit on the project in ./target-folder and output the results as an HTML report.
โ†’Check the code in ./plugin-folder for potential prompt injection or tool poisoning risks.
โ†’Perform a deep security scan on the repository at ./project and provide a JSON summary.

Frequently Asked Questions

What are the key features of AgentShield?

Uses 13 independent scanning engines for comprehensive security analysis. Detects prompt injection, data exfiltration, backdoors, and tool poisoning. Supports multi-language injection detection across 8 languages. Generates shareable HTML, JSON, and SARIF reports for CI/CD integration. Performs real-time MCP runtime interception and static analysis.

What can I use AgentShield for?

Verifying the safety of third-party MCP servers before installation. Auditing AI agent configurations for hidden malicious instructions. Scanning local project directories for hardcoded API keys and secrets. Integrating automated security checks into CI/CD pipelines for AI projects.

How do I install AgentShield?

Install AgentShield by running: npx @elliotllliu/agent-shield scan ./path-to-target

What MCP clients work with AgentShield?

AgentShield works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep AgentShield docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare