#!/bin/bash # Exit on error set -e echo "Provisioning MCP environment..." # Check for Python 3 if ! command -v python3 &> /dev/null; then echo "Python 3 could not be found. Please install Python 3." exit 1 fi # Create Virtual Environment if [ ! -d "venv" ]; then echo "Creating virtual environment..." python3 -m venv venv else echo "Virtual environment already exists." fi # Activate venv source venv/bin/activate # Upgrade pip echo "Upgrading pip..." pip install --upgrade pip # Install dependencies if [ -f "requirements.txt" ]; then echo "Installing dependencies from requirements.txt..." pip install -r requirements.txt else echo "requirements.txt not found!" exit 1 fi # Create .env from template if it doesn't exist if [ ! -f ".env" ]; then echo "Creating .env file..." touch .env echo "GOOGLE_API_KEY=" >> .env echo "Please add your GOOGLE_API_KEY to mcp/.env" fi echo "Setup complete! To start working:" echo "cd mcp" echo "source venv/bin/activate"