mcp-audit
mcp-audit
MCP 서버용 npm audit. MCP 서버를 대상으로 하여 인증 누락, SSRF 표면, 고권한 도구, 프롬프트 인젝션에 취약한 도구 설명, 유출된 비밀 등을 포함한 보안 등급(A–F)을 제공합니다.
이것이 존재하는 이유 (2026년 데이터): 약 7,000개의 공개 MCP 서버 중 41%가 인증을 필요로 하지 않으며, 36.7%가 SSRF 표면을 노출하고, 8.5%만이 OAuth를 사용하며, 단 60일 동안 30개 이상의 CVE가 제출되었습니다. 서버 수는 포화 상태(22,000개 이상의 서버)이지만, 보안 태세는 그렇지 않습니다. 다른 도구(예: Invariant의 mcp-scan)는 단일 서버를 깊이 검사하는 반면, mcpaudit은 **레지스트리 전체 배치 감사(audit)**를 추가합니다: 공식 MCP 레지스트리를 가리키면 전체 생태계를 한 번에 평가합니다.
npm i -g @andreolf/mcpaudit # then: mcpaudit <url>
# or zero-install: npx @andreolf/mcpaudit <url>실행해도 안전한가요? 설계상 안전합니다: mcpaudit은 읽기 전용 initialize + tools/list 핸드셰이크만 보내고 선언된 도구만 검사합니다. 명시적으로 --allow-exec를 전달하여 로컬/npm 서버를 실행하지 않는 한, 스캔된 서버의 코드를 절대 실행하지 않습니다.
⚠️ 휴리스틱 스캐너입니다. 발견 사항은 표면(예: "인증 없음", "URL 가져오기 도구 노출")을 설명할 뿐, 입증된 익스플로잇은 아닙니다. 깨끗한 보고서는 보안 보장이 아닙니다. 테스트할 권한이 있는 서버만 스캔하고, 발견 사항을 책임감 있게 공개하세요. SECURITY.md를 참조하세요.
사용법
원격 서버 스캔 (Streamable HTTP):
node bin/mcp-audit.js https://example.com/mcp
node bin/mcp-audit.js https://example.com/mcp --header "Authorization: Bearer $TOKEN" --json게시된 서버 스캔 (npx -y <package>를 통해 실행):
node bin/mcp-audit.js --npm @modelcontextprotocol/server-filesystem --timeout 20000로컬 서버 스캔 (명령어로 시작, stdio):
node bin/mcp-audit.js --cmd "node my-server.js"Node 18+ 필요 (전역 fetch 사용). 종속성 없음. 설치: npm i -g @andreolf/mcpaudit 그 다음 mcpaudit <url> — 또는 npx @andreolf/mcpaudit <url>.
종료 코드: 0 깨끗함 · 1 치명적/높음 발견 · 2 스캔 불가/잘못된 사용법. CI 친화적.
Related MCP server: mcp-security-audit
배치 모드 (출시 감사)
여러 서버를 스캔하고 최악 우선 순위표 + 출시 게시물을 위한 집계 통계를 얻습니다:
node bin/mcp-audit-batch.js targets.txt --out audit.mdtargets.txt는 한 줄에 하나의 대상입니다 (https://…, npm:<package>, 또는 cmd:<command>; # 주석 허용).
⚠️ 안전:
npm:/cmd:서버를 스캔하면 해당 서버의 코드가 사용자 컴퓨터에서 실행됩니다. 배치 모드는 기본적으로 HTTP 전용이며--allow-exec를 전달하지 않는 한 로컬/npm 대상을 건너뜁니다. 신뢰할 수 있는 샌드박스/컨테이너 내에서만 실행하세요. 신뢰할 수 없는 패키지를 대량 실행하면 원격 코드 실행 위험이 있습니다.
출력에는 출시 스레드가 되는 헤드라인 숫자("X%의 접근 가능한 HTTP 서버가 인증 없이 initialize를 수락함")가 포함됩니다.
전체 출시 파이프라인
공식 MCP 레지스트리에서 대상을 가져온 후(검색 전용 — 서버를 실행하지 않음) 감사합니다:
node bin/mcp-audit-fetch.js --max 300 --out targets.txt # HTTP remotes = safe to scan
node bin/mcp-audit-batch.js targets.txt --concurrency 8 --out audit.mdmcpaudit-fetch는 레지스트리 HTTP 엔드포인트를 스캔 가능한 줄로, npm 패키지를 주석 처리된 줄로 출력합니다(--include-npm으로 옵트인, 그 다음 샌드박스에서 --allow-exec). 실제로 처음 30개의 레지스트리 서버를 실행한 결과 50%가 인증 없이 initialize를 수락했습니다 — 출시 게시물이 기반으로 하는 숫자입니다.
CI에서 사용 (GitHub Action)
모든 PR에서 MCP 서버의 보안을 게이트하세요. 서버를 시작한 다음 액션을 가리키세요:
- name: Start my MCP server
run: node my-server.js & # or docker run ..., then wait for it to be ready
- name: Security-audit the MCP server
uses: andreolf/mcp-audit@v1
with:
url: http://localhost:3000/mcp
fail-on: D # fail the job on grade D or worse (default: F)
# header: "Authorization: Bearer ${{ secrets.MCP_TOKEN }}" # optional작업은 A–F 등급과 발견 사항을 출력하며, 등급이 fail-on 이하이면 실패합니다. 스캔된 서버에서 아무것도 실행되지 않습니다 — 읽기 전용 핸드셰이크만 보냅니다.
테스트
npm test # spawns the mock insecure server (stdio + batch) and asserts findings — 12 checks검사 항목 (초기 휴리스틱 — 확장 가능)
no-auth — 서버가 자격 증명 없이
initialize를 수락합니다 (치명적)ssrf-surface — URL을 받거나 아웃바운드 요청을 하는 도구 (높음)
high-privilege-tool — exec/shell/delete/write-file 스타일 도구 (높음)
injection-in-description — 도구 설명에서 override/injection 표현 (중간)
leaked-secret — 도구 메타데이터의 토큰/키 형태 문자열 (치명적)
아키텍처
bin/mcp-audit.js CLI entry (arg parsing, exit codes for CI)
src/scan.js orchestrator
src/mcpClient.js MCP Streamable-HTTP transport: initialize + tools/list
src/checks.js heuristic security checks -> findings
src/report.js grading (A–F), badge, Markdown/JSON output로드맵 (이 뼈대를 바이럴 제품으로 만들기)
✅ stdio + npm 전송 방식 — 원격 URL뿐만 아니라 로컬(
--cmd) 및 게시된(--npm, npx를 통해) 서버를 스캔합니다. 이를 통해 출시 감사를 위해 레지스트리의 상위 서버를 스캔할 수 있습니다. (PyPI/uvx동등 기능은 작은 후속 작업입니다.)정적 키 vs OAuth 감지 — 인증 도전/토큰 형식을 검사합니다.
더 깊은 SSRF 프로브 — 샌드박스에서 카나리 내부 URL에 대해 실제로 fetch 스타일 도구를 호출합니다.
✅ 배치 모드 + 순위표 —
mcpaudit-batch targets.txt→ 순위 보고서 + 헤드라인 통계. 이 순위 보고서가 출시 결과물입니다: "가장 많이 설치된 MCP 서버 200개를 감사했습니다."✅ 레지스트리 페처 (
mcpaudit-fetch) — 공식 MCP 레지스트리에서 HTTP 대상을 가져옵니다(검색 전용, 실행하지 않음). npm 패키지는 주석 처리되어 출력됩니다.--include-npm으로 옵트인.임베드 가능한 배지 — 서버가 README에 추가하는
MCP Security: Ashields.io 스타일 배지 (2026년 순위 신호, 그리고 무료 배포).레지스트리 존재 — mcp.so, smithery.ai, glama.ai, PulseMCP, 공식 MCP 레지스트리에 등록하고 punkpeye/awesome-mcp-servers에 PR을 보냅니다. 하나의 메타데이터 팩을 준비하여 모두에 제출합니다.
라이선스
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceSecurity scanner for MCP servers. Detects prompt injection, command injection, auth bypass, and excessive permissions across tools, resources, and prompts.482MIT
- Alicense-qualityCmaintenanceSecurity auditor for MCP servers that enumerates tools, resources, and prompts, scans for injection patterns, classifies risk levels, and produces a scored report (0-100, grades A-F).2MIT
- Alicense-qualityAmaintenanceSecurity scanner for MCP servers — vet an MCP before you wire it into an agent. Detects prompt-injection, credential exfiltration (via taint analysis), RCE, and supply-chain risks, and catches cross-server exfil chains no single server reveals. Zero-dependency local CLI, SARIF output, CI-gateable, no account.43MIT
- AlicenseCqualityBmaintenanceSecurity scanner and MCP server that catches dangerous patterns in MCP servers and AI agent projects, such as leaked secrets, shell execution, and prompt-injection text. Runs as both a CLI and MCP server with CI-friendly severity gates.21MIT
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Grade MCP servers A to F with the open behavioral litmus. npm: full toolset; hosted: lookups only.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreolf/mcp-audit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server