#!/bin/bash # Run script for MCP Server set -e # Get the directory where this script is located SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" cd "$SCRIPT_DIR" # Check if virtual environment exists if [ ! -d "venv" ]; then echo "Virtual environment not found. Running setup..." ./setup.sh fi # Activate virtual environment source venv/bin/activate # Set PYTHONPATH to include the mcp-server directory so imports work export PYTHONPATH="$SCRIPT_DIR:$PYTHONPATH" # Run the server # This ensures Python can find the tools module echo "Starting MCP Server..." echo "Running from: $(pwd)" python server/mcp_server.py