Trifecta-Lab / scripts /run_mcp_server.sh
Brettapps's picture
Upload folder using huggingface_hub (part 21)
e23172f verified
Raw History Blame Contribute Delete
409 Bytes
#!/usr/bin/env bash
set -euo pipefail
VENV="$HOME/trifecta-bro-hf-space/.mcp-venv"
PY="$VENV/bin/python"
export PYTHONPATH="$HOME/trifecta-bro-hf-space/src"
exec "$PY" - "$HOME/trifecta-bro-hf-space/src/mcp_server.py" << 'PYEOF'
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[0]))
from mcp_server import mcp
import asyncio
asyncio.run(mcp.run_stdio_async())
PYEOF