#!/bin/bash # Competitive Analysis Agent - Full MCP Setup Script # This script sets up and runs the complete MCP architecture set -e echo "==================================" echo "Competitive Analysis Agent - Setup" echo "==================================" echo "" # Check Python version python_version=$(python3 --version 2>&1 | awk '{print $2}') echo "✓ Python version: $python_version" # Install dependencies echo "" echo "Installing dependencies..." pip install -q -r requirements.txt echo "✓ Dependencies installed" # Create server startup script echo "" echo "Starting MCP Server..." echo "This will run on: http://127.0.0.1:8001/mcp" echo "" # Start MCP server in background python3 mcp_server.py & SERVER_PID=$! echo "✓ MCP Server started (PID: $SERVER_PID)" # Give server time to start sleep 3 # Start Gradio interface echo "" echo "Starting Gradio Interface..." echo "This will run on: http://0.0.0.0:7860" echo "" python3 app.py # Cleanup on exit trap "kill $SERVER_PID" EXIT