vuln_mcp_app
vuln_mcp_app
一个刻意留有漏洞、可在本地运行的 Model Context Protocol(MCP)安全实验室 —— 一个受控的目标(概念上相当于“MCP 版 DVWA”),用于评估另一个独立的 FYP 安全扫描器。这个应用是目标,而不是扫描器。 它托管了少量有文档记录的 MCP 漏洞,并输出证据;它从不报告自身是否存在漏洞(无内置判定器,SEC-006)。
⚠️ 仅供教育/研究使用。 全部在本地运行,使用合成数据和假机密(
DEMO_SECRET_*)。无真实凭据,不触碰外部目标,不进行互联网扫描,不访问宿主机。
范围(正好三个靶场)
ID | OWASP MCP | Vulnerable | Status |
VULN-MCP03-001 | MCP03 | 工具投毒 | 已实现 |
VULN-MCP05-001 | MCP05 | 命令注入与执行 | 已实现 |
VULN-MCP10-001 | MCP10 | 上下文注入与过度共享 | 待实现 |
范围外不包含其它漏洞靶场。每个已实现的靶场都同时提供 VULNERABLE(存在漏洞)以及真正修复过的 SECURE(安全)两种模式。
Related MCP server: vuln-mcp-server
运行方式(无需 Docker —— 一条命令加一个浏览器)
整个应用运行自一个 uvicorn 进程:FastAPI 在 / 下提供构建后的 UI,在 /api 下提供 API。
首次运行
# 1) Build the UI once (Node 18+). Produces frontend/dist.
cd frontend && npm install && npm run build && cd ..
# 2) Run the app (uv resolves Python deps automatically; Python 3.12+).
uv run uvicorn backend.app.main:app --reload --host 127.0.0.1 --port 8000然后打开 http://127.0.0.1:8000 —— 靶场 UI 会出现。交互式 API 文档位于 http://127.0.0.1:8000/docs。
更习惯用传统的 venv,而不是
uv?python -m venv .venv && source .venv/Scripts/activate # Windows Git Bash pip install -r backend/requirements.txt uvicorn backend.app.main:app --reload --host 127.0.0.1 --port 8000
首次构建之后
直接运行 uvicorn 命令并打开浏览器。只有改动前端代码后,才需要重新构建 UI(npm run build)。
前端热重载(可选,用于 UI 开发)
在 :8000 上运行 API,在 :5173 上运行 Vite 开发服务器(它会代理 /api):
# terminal 1
uv run uvicorn backend.app.main:app --reload --host 127.0.0.1 --port 8000
# terminal 2
cd frontend && npm run dev # open http://127.0.0.1:5173测试
# Backend (pytest)
uv run pytest # or: .venv/Scripts/python -m pytest
# Frontend (Vitest + tsc)
cd frontend && npm test && npx tsc --noEmit架构
Browser (React SPA, served by FastAPI at :8000)
│ HTTP/JSON (/api)
▼
FastAPI control plane (ordinarily secure) ── MCP client ──► MCP tool registry
│ (vulnerable | secure)
▼ │
SQLite (labs, tools, telemetry, evidence) ◄── telemetry/evidence ─┘控制平面是普通的安全基础设施(SEC-004)。只有明确标注为 MCP 平面的工具才可能变得有漏洞,且仅仅在 vulnerable 模式下。刻意含有漏洞的文件会带 banner:# INTENTIONALLY VULNERABLE — <VULN-ID> — see docs/GROUND-TRUTH.md。
MCP 传输: Phase 0 使用进程内 registry 传输,所以整个应用跑在单个进程里。streamable-HTTP MCP 传输(来自官方 SDK)是未来在同一个客户端 API 之下的升级路径。
MCP05 沙箱(构建后): 移除 Docker 后,MCP05 靶场的命令执行运行在一个受限的进程内子进程运行器中 —— 包括一个临时工作目录、项目提供的假
convertshim、硬超时,并且安全模式下不启用 shell。影响范围仍只限于本地和合成数据(SEC-001/003);Docker 之前提供的 OS 级隔离(no-network、cap-drop)由该受限运行器取代。参见sandbox/README.md。
技术栈
React + TypeScript + Vite + Tailwind · Python 3.12 + FastAPI + Pydantic v2 ·
official Python MCP SDK · SQLite + SQLModel · pytest + httpx · Vitest + Testing
Library. 使用 uv/uvicorn 运行(无 Docker)。
API 接口面(可供 FYP 分析)
GET /api/health · GET /api/labs · GET /api/labs/{id} ·
POST /api/labs/{id}/mode|reset|attack|start · GET /api/labs/{id}/telemetry ·
GET /api/mcp/servers|tools · GET /api/mcp/tools/{id} ·
POST /api/mcp/tools/{id}/call · GET /api/vulnerabilities(仅目录元数据)· GET /api/evidence。
任何端点都不会泄露漏洞判定结论(SEC-006)。
用于 FYP 评估(评估流程)
启动目标(MCP03 默认为
vulnerable模式)。 2. 按照docs/GROUND-TRUTH.md中的手动验证步骤确认靶场生效。 3. 让 FYP 对 HTTP + MCP 两个接口面运行。 4. 将发现结果与docs/GROUND-TRUTH.md进行比对。切换到 Secure 模式并重新运行,以测算误报。 6. 重置后重复执行。
项目文档
docs/GROUND-TRUTH.md— 答案密钥(逐漏洞 + 矩阵)。docs/OWASP-MCP-MAPPING.md— OWASP MCP Top 10 映射。docs/TEST-SCENARIOS.md— FYP 验证场景。CLAUDE.md— 实现记忆 / 当前阶段状态。docs/PRD.md、docs/TDD.md— 设计契约,仅保存在本地(git-ignored)。已于 2026-08-21 更新为无 Docker 运行模式。
当前状态
MCP03 和 MCP05 已完成(所有阶段)。通过 uvicorn 以无 Docker 方式运行。MCP10 已在目录(catalog)中搭好脚手架,尚未实现。参见 CLAUDE.md。
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
- FlicenseNot gradedqualityCmaintenanceA deliberately insecure MCP server designed as a pentest lab to demonstrate common vulnerabilities in MCP deployments.
- FlicenseNot gradedqualityCmaintenanceA vulnerable-by-design MCP server pair (NotesServer and VaultServer) for testing MCP security tools, featuring confused-deputy, prompt injection, and authorization bypass scenarios.
- AlicenseNot gradedqualityDmaintenanceA deliberately vulnerable MCP application for learning MCP security through hands-on exercises covering OWASP MCP Top 10 categories.MIT
- FlicenseNot gradedqualityCmaintenanceAn intentionally vulnerable MCP server designed as a live demo target for the MCP Trust security scanner. It contains deliberate insecure patterns to demonstrate scanning capabilities.
Related MCP Connectors
MCP server for static security analysis of Android source code
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10
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/arrugit/vuln_mcp_app'
If you have feedback or need assistance with the MCP directory API, please join our Discord server