| # With stdio transport, MCP server is spawned by the MCP client automatically | |
| # No need to start it separately | |
| AGENT_DIR="/home/hivenet/ComputeAgent" | |
| AGENT_PID="/home/hivenet/agent.pid" | |
| CURR_DIR=$(pwd) | |
| GRADIO_DIR=${CURR_DIR} | |
| # Start Compute Agent (MCP client will spawn MCP server via stdio) | |
| cd ${AGENT_DIR} | |
| python main.py & echo $! > ${AGENT_PID} | |
| sleep 5 | |
| # Start Gradio Web Server | |
| cd ${GRADIO_DIR} | |
| python Gradio_interface.py | |
| # Cleanup on exit | |
| pkill -F ${AGENT_PID} | |
| rm ${AGENT_PID} |