-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlaunch_mcp_inspector.sh
More file actions
executable file
·35 lines (26 loc) · 1.23 KB
/
launch_mcp_inspector.sh
File metadata and controls
executable file
·35 lines (26 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Launch MCP Inspector for remote readsb testing
echo "MCP Inspector Launch Script for Remote readsb"
echo "============================================="
# Check if MCP Inspector is installed
if ! command -v npx &> /dev/null; then
echo "Error: npx is not installed. Please install Node.js first."
exit 1
fi
# Get remote host from user
read -r -p "Enter the IP address or hostname of your ADS-B feeder (default is adsb-feeder.local): " REMOTE_HOST
if [ -z "$REMOTE_HOST" ]; then
REMOTE_HOST="adsb-feeder.local"
echo "Using default host: $REMOTE_HOST"
fi
# Get port (default to 8080)
read -r -p "Enter the port (default 8080): " REMOTE_PORT
REMOTE_PORT=${REMOTE_PORT:-8080}
# Get inspector proxy port (default to 3000)
read -r -p "Enter the MCP Inspector proxy port (default 3000): " INSPECTOR_PORT
INSPECTOR_PORT=${INSPECTOR_PORT:-3000}
echo "Launching MCP Inspector for $REMOTE_HOST:$REMOTE_PORT on proxy port $INSPECTOR_PORT..."
# Get the script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Launch MCP Inspector with custom proxy port
npx @modelcontextprotocol/inspector --port "$INSPECTOR_PORT" node "$SCRIPT_DIR/dist/src/readsb_mcp_server.js" --base-url "http://$REMOTE_HOST:$REMOTE_PORT"