Skip to content

MCP Armor

MCP Armor continuously secures and monitors Model Context Protocol operations through static and dynamic scans, revealing hidden risks in agent-to-tool communications.

Install

$pip install mcp-armor

Install command taken from the project's README or registry entry. Always review code before running it.

MCP Armor

🚀 Overview

MCP Armor is a comprehensive security scanner for Model Context Protocol (MCP). Automatically discovers, analyzes, and secures MCP servers integrated with all major Agentic IDEs, Agents and Clients.

💡 Features

  • 🔍 Auto-Discovery: Finds known MCP configurations for popular Agentic IDEs like Cursor, Windsurf, VS Code, Claude Desktop, and more
  • 🔧 Tool, Resource & Prompt Inventory: Connects to MCP servers and catalogs available tools, resources, and prompt templates
  • 🛡️ Security Analysis: Specialized security checks including Prompt Injection, Rug Pull Attack, Cross-server Tool Shadowing, Tool Poisoning, Tool Name Ambiguity, and more..
  • 🧭 Baseline Drift Detection: Captures approved MCP components and detects rug pulls attacks
  • 📊 Comprehensive Reporting: Generates JSON and Markdown reports with actionable findings
  • 📜 Audit Trail: Timestamped baselines and reports for full traceability of changes and findings

🧰 Installation

pip install mcp-armor

🏃 Quick Start

# Scan all configurations with security analysis (auto-detects baseline.json if present)
mcp-armor scan

# Inspect configurations and generate baseline (defaults to baseline.json)
mcp-armor inspect

# Use custom configuration file
mcp-armor scan --config /path/to/config.json

# Scan multiple configuration files
 mcp-armor scan \
   --config /path/to/cursor.mcp.json \
   --config /path/to/vscode.mcp.json

# Use custom baseline file path
mcp-armor inspect --baseline /path/to/my-baseline.json
mcp-armor scan --baseline /path/to/my-baseline.json

# Generate markdown report
mcp-armor scan --report-type md

# Save to custom file
mcp-armor scan --output my-report.json
mcp-armor scan --report-type md --output my-report.md

⚙️ Command Options

Option Description
--config Custom configuration file path (can be used multiple times)
--baseline Baseline file for drift detection (scan) or creation (inspect)
--report-type {json,md} Output format (default: json)
--output Custom output file path
--verbose Detailed terminal output
--show-logs Display debug logs in terminal

🔰 Security Checks

🛡️ Standard Checks

  • Prompt Injection
  • Indirect Prompt Injection
  • Cross-Server Tool Shadowing
  • Tool Poisoning
    • Prompt Injection in Tool Description, Name and Args
    • Command Injection in Tool Description, Name and Args
  • Tool Name Ambiguity
  • Command Injection
  • Excessive Tool Permissions
  • Hardcoded Secrets

🧭 Baseline Checks

Detects deviations from approved MCP components (requires a baseline generated via inspect mode):

  • Rug Pull Attack
    • Tool Modified
    • Resource Modified
    • Resource Template Modified
    • Prompt Modified

📃 Logging

Logs are automatically saved to logs/mcp_armor.log:

# Default: logs saved to file only
mcp-armor scan

# Show logs in terminal too
mcp-armor scan --show-logs

🧪 Demo

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related