#!/bin/bash
# Run Web UI Server for Graphiti MCP
echo "========================================"
echo "Graphiti MCP - Web UI Server"
echo "========================================"
echo ""
# Check if .env file exists
if [ ! -f ".env" ]; then
echo "Error: .env file not found!"
echo "Please create a .env file with your configuration."
echo "See env.example for reference."
exit 1
fi
# Try port 8081 first, allow override via argument
PORT=${1:-8081}
echo "Starting Web UI Server on http://localhost:$PORT"
echo "Open your browser and navigate to: http://localhost:$PORT"
echo ""
echo "Press Ctrl+C to stop the server"
echo ""
# Run the web UI server
python web_ui_server.py $PORT