#!/bin/bash
# Move to the directory of this script
cd "$(dirname "$0")"

# Setup virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
    echo "[Setup] Creating Python virtual environment with Python 3.11..."
    python3.11 -m venv venv
fi

# Activate virtual environment
source venv/bin/activate

# Install or upgrade dependencies
echo "[Setup] Installing/updating requirements..."
python3.11 -m pip install --upgrade pip
pip install -r requirements.txt

# Run the python server
echo "[Setup] Starting Python MCP server..."
python server.py
