Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions dev-with-mitm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# Easy script to run MCP server with mitmproxy intercepting client traffic

echo "🚀 Starting MCP server with mitmproxy..."
echo ""
echo "This will:"
echo " 1. Start your MCP server on port 3232"
echo " 2. Start mitmproxy reverse proxy on port 8080"
echo " 3. Intercept all client → server traffic"
echo ""
echo "📡 Connect your MCP client to: http://localhost:8080/mcp"
echo "🔍 View traffic in mitmproxy TUI"
echo ""
echo "Press Ctrl+C to stop both processes"
echo ""

# Trap Ctrl+C to kill both processes
trap 'kill 0' EXIT

# Start the MCP server in background
npm run dev &
SERVER_PID=$!

# Give server time to start
sleep 3

# Start mitmproxy in reverse proxy mode (foreground so we see the TUI)
mitmproxy --mode reverse:http://localhost:3232 --listen-port 8080

# This line won't be reached until mitmproxy exits
wait
31 changes: 31 additions & 0 deletions dev-with-mitmweb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# Easy script to run MCP server with mitmproxy web interface

echo "🚀 Starting MCP server with mitmproxy web UI..."
echo ""
echo "This will:"
echo " 1. Start your MCP server on port 3232"
echo " 2. Start mitmproxy with web UI on port 8081"
echo " 3. Proxy client traffic through port 8080"
echo ""
echo "📡 Connect your MCP client to: http://localhost:8080/mcp"
echo "🌐 View traffic in browser at: http://localhost:8081"
echo ""
echo "Press Ctrl+C to stop both processes"
echo ""

# Trap Ctrl+C to kill both processes
trap 'kill 0' EXIT

# Start the MCP server in background
npm run dev &
SERVER_PID=$!

# Give server time to start
sleep 3

# Start mitmweb in reverse proxy mode
mitmweb --mode reverse:http://localhost:3232 --listen-port 8080 --web-port 8081

# This line won't be reached until mitmweb exits
wait
Loading
Loading