File size: 962 Bytes
2529009
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dc9491b
2529009
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash$

set -e # Exit immediately on error

echo "⚙️ Installing dependencies (if needed)..."
# Optional: only use this line if venv or dependencies are not pre-installed
# pip install -r requirements.txt

echo "🔧 Preparing MCP server environment..."
# Create writable log directory and file if needed
# mkdir -p /tmp/mcp_logs
# touch /tmp/mcp_logs/mcp_server_activity.log
# chmod 755 /tmp/mcp_logs
# chmod 644 /tmp/mcp_logs/mcp_server_activity.log
# chmod 777 /app/telco_network_optimizer_agent/

# Set environment variable for MCP server log path
# export MCP_LOG_PATH="/tmp/mcp_logs/mcp_server_activity.log"

# Test if MCP server can run (don't fail if chmod doesn't work)
echo "🧪 Testing MCP server configuration..."
python /app/test_failure_analysis/sponge_mcp_server.py --help > /dev/null 2>&1 || echo "⚠️  MCP server test failed - continuing anyway"

echo "🌐 Starting ADK MCP server..."
adk web --host 0.0.0.0 --port "${PORT:-7860}"