#!/bin/bash
# ๐ญ Enhanced Quake Coding Arena - Remote (Smithery) Setup
#
# "Where coding victories become legendary achievements, deployed to the cloud!"
#
# - The Enhanced Quake Arena Remote Setup Virtuoso
set -e
echo "๐ โจ ENHANCED QUAKE CODING ARENA - REMOTE SETUP COMMENCES!"
echo "๐ Setting up for Smithery cloud deployment..."
# ๐จ Navigate to the enhanced arena
cd "$(dirname "$0")"
# ๐ฆ Check Node.js
if ! command -v npm >/dev/null 2>&1; then
echo "โ Node.js/npm not found. Please install Node.js first:"
echo " brew install node # macOS"
echo " sudo apt install nodejs npm # Ubuntu/Debian"
exit 1
fi
# ๐ฆ Check Smithery CLI
if ! command -v npx >/dev/null 2>&1; then
echo "โ npx not found. Please install Node.js with npm."
exit 1
fi
# ๐ฆ Install dependencies
echo "๐ฆ Installing dependencies..."
npm install
echo "โ
๐ฆ Dependencies installed successfully!"
# ๐ง Build for Smithery
echo "๐ง Building for Smithery deployment..."
npm run build
if [ $? -eq 0 ]; then
echo "โ
Build successful!"
else
echo "โ Build failed. Please check errors above."
exit 1
fi
# ๐ช Verify sounds are included
echo "๐ช Verifying sounds directory..."
if [ ! -d "sounds" ]; then
echo "โ ๏ธ Warning: sounds/ directory not found"
else
MALE_COUNT=$(find sounds/male -name "*.mp3" 2>/dev/null | wc -l | tr -d ' ')
FEMALE_COUNT=$(find sounds/female -name "*.mp3" 2>/dev/null | wc -l | tr -d ' ')
echo "โ
Found $MALE_COUNT male + $FEMALE_COUNT female audio files"
fi
# ๐ Verify package.json configuration
echo "๐ Verifying Smithery configuration..."
if grep -q '"smithery"' package.json; then
echo "โ
Smithery configuration found in package.json"
else
echo "โ ๏ธ Warning: Smithery configuration not found in package.json"
fi
# ๐ง Verify smithery.yaml
if [ -f "smithery.yaml" ]; then
echo "โ
smithery.yaml found"
else
echo "โ ๏ธ Warning: smithery.yaml not found"
fi
# ๐ฎ Claude Desktop Configuration for Remote (Smithery)
if [[ "$OSTYPE" == "darwin"* ]]; then
CLAUDE_CONFIG_DIR="$HOME/Library/Application Support/Claude"
CLAUDE_CONFIG_FILE="$CLAUDE_CONFIG_DIR/claude_desktop_config.json"
echo "๐ฏ Configuring Claude Desktop for Smithery deployment..."
# Create config if it doesn't exist
if [ ! -f "$CLAUDE_CONFIG_FILE" ]; then
mkdir -p "$CLAUDE_CONFIG_DIR"
echo '{"mcpServers": {}}' > "$CLAUDE_CONFIG_FILE"
fi
LOCAL_BUILD_PATH="$(pwd)/.smithery/index.cjs"
SMITHERY_URL="https://server.smithery.ai/@Ripnrip/quake-coding-arena-mcp/mcp"
echo "๐ Package is published on Smithery!"
echo " ๐ View at: https://smithery.ai/server/@Ripnrip/quake-coding-arena-mcp"
echo ""
echo "๐ Connection Options:"
echo " 1. HTTP Endpoint (Recommended for Smithery):"
echo " URL: $SMITHERY_URL"
echo " 2. Local Build (For testing):"
echo " Path: $LOCAL_BUILD_PATH"
echo ""
# For now, use local build since HTTP endpoints need special MCP client support
if [ -f "$LOCAL_BUILD_PATH" ]; then
echo "๐ฆ Configuring for local build (Smithery HTTP endpoints require client support)"
if command -v jq >/dev/null 2>&1; then
# Use local build path
jq ".mcpServers.\"quake-coding-arena-remote\" = {
\"command\": \"node\",
\"args\": [\"$LOCAL_BUILD_PATH\"]
}" "$CLAUDE_CONFIG_FILE" > "$CLAUDE_CONFIG_FILE.tmp" && mv "$CLAUDE_CONFIG_FILE.tmp" "$CLAUDE_CONFIG_FILE"
echo "โ
Claude Desktop configured to use local build!"
echo ""
echo "๐ก To use Smithery HTTP endpoint:"
echo " โข Some MCP clients support HTTP transport"
echo " โข Use URL: $SMITHERY_URL"
echo " โข Check your MCP client documentation for HTTP endpoint support"
else
echo "โ ๏ธ jq not found. Please manually add to Claude Desktop config:"
echo " File: $CLAUDE_CONFIG_FILE"
echo " Add: \"quake-coding-arena-remote\": { \"command\": \"node\", \"args\": [\"$LOCAL_BUILD_PATH\"] }"
fi
else
echo "โ ๏ธ Local build not found. Run 'npm run build' first."
echo " Or use Smithery HTTP endpoint: $SMITHERY_URL"
fi
fi
# ๐ Final setup celebration
echo ""
echo "๐ โจ REMOTE SETUP COMPLETE! ๐ โจ"
echo ""
echo "๐ Enhanced Quake Coding Arena is ready for Smithery deployment!"
echo " โข 25 Epic Achievements"
echo " โข 15 Male + 16 Female audio files"
echo " โข 10 MCP Tools"
echo " โข HTTP Streamable Transport"
echo " โข Cloud-ready deployment"
echo ""
echo "๐ Next Steps:"
echo " 1. Package Status:"
echo " ๐ฆ Package is published on Smithery!"
echo " ๐ View at: https://smithery.ai/server/@Ripnrip/quake-coding-arena-mcp"
echo " โ ๏ธ Note: Smithery packages use HTTP endpoints, not npx"
echo " โข For Claude Desktop, use the connection URL from Smithery"
echo " โข Or configure via Smithery's MCP connection method"
echo " โข See: https://smithery.ai/server/@Ripnrip/quake-coding-arena-mcp"
echo " 2. Test locally: npm run smithery:dev"
echo " 3. Build: npm run smithery:build"
echo ""
echo "๐ Smithery Deployment Commands:"
echo " โข npm run smithery:dev - Test Smithery deployment locally"
echo " โข npm run smithery:build - Build for Smithery"
echo " โข npm run smithery:test - Test MCP server"
echo ""
echo "๐ Documentation:"
echo " โข See SMITHERY-DEPLOYMENT.md for detailed deployment guide"
echo " โข See PUBLISH.md for publishing instructions"
echo ""
echo "๐ Ready to DOMINATE in the cloud! ๐ฅ"