File tree Expand file tree Collapse file tree 6 files changed +848
-1211
lines changed
Expand file tree Collapse file tree 6 files changed +848
-1211
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Easy script to run MCP server with mitmproxy intercepting client traffic
3+
4+ echo " 🚀 Starting MCP server with mitmproxy..."
5+ echo " "
6+ echo " This will:"
7+ echo " 1. Start your MCP server on port 3232"
8+ echo " 2. Start mitmproxy reverse proxy on port 8080"
9+ echo " 3. Intercept all client → server traffic"
10+ echo " "
11+ echo " 📡 Connect your MCP client to: http://localhost:8080/mcp"
12+ echo " 🔍 View traffic in mitmproxy TUI"
13+ echo " "
14+ echo " Press Ctrl+C to stop both processes"
15+ echo " "
16+
17+ # Trap Ctrl+C to kill both processes
18+ trap ' kill 0' EXIT
19+
20+ # Start the MCP server in background
21+ npm run dev &
22+ SERVER_PID=$!
23+
24+ # Give server time to start
25+ sleep 3
26+
27+ # Start mitmproxy in reverse proxy mode (foreground so we see the TUI)
28+ mitmproxy --mode reverse:http://localhost:3232 --listen-port 8080
29+
30+ # This line won't be reached until mitmproxy exits
31+ wait
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Easy script to run MCP server with mitmproxy web interface
3+
4+ echo " 🚀 Starting MCP server with mitmproxy web UI..."
5+ echo " "
6+ echo " This will:"
7+ echo " 1. Start your MCP server on port 3232"
8+ echo " 2. Start mitmproxy with web UI on port 8081"
9+ echo " 3. Proxy client traffic through port 8080"
10+ echo " "
11+ echo " 📡 Connect your MCP client to: http://localhost:8080/mcp"
12+ echo " 🌐 View traffic in browser at: http://localhost:8081"
13+ echo " "
14+ echo " Press Ctrl+C to stop both processes"
15+ echo " "
16+
17+ # Trap Ctrl+C to kill both processes
18+ trap ' kill 0' EXIT
19+
20+ # Start the MCP server in background
21+ npm run dev &
22+ SERVER_PID=$!
23+
24+ # Give server time to start
25+ sleep 3
26+
27+ # Start mitmweb in reverse proxy mode
28+ mitmweb --mode reverse:http://localhost:3232 --listen-port 8080 --web-port 8081
29+
30+ # This line won't be reached until mitmweb exits
31+ wait
You can’t perform that action at this time.
0 commit comments