Skip to main content
Glama
launch-browser-automation.sh•2.51 kB
#!/bin/bash # Launch Script for Browser Automation MCP Server # Version: 2.0.0 # Created: 2025-07-02 echo "šŸš€ EuConquisto Composer Browser Automation Launcher v2.0.0" echo "=======================================================" # Check if JWT redirect server is running check_jwt_server() { if curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/health | grep -q "200"; then echo "āœ… JWT redirect server is already running on port 8080" return 0 else echo "āš ļø JWT redirect server is not running" return 1 fi } # Start JWT redirect server if not running start_jwt_server() { echo "šŸ” Starting JWT redirect server..." node tools/servers/jwt-redirect-server-v1.0.2.js & JWT_PID=$! echo " JWT server started with PID: $JWT_PID" # Wait for server to be ready sleep 2 if check_jwt_server; then echo "āœ… JWT server is ready" else echo "āŒ Failed to start JWT server" exit 1 fi } # Check JWT token check_jwt_token() { JWT_FILE="archive/authentication/correct-jwt-new.txt" if [ -f "$JWT_FILE" ]; then echo "āœ… JWT token found at $JWT_FILE" # Check token expiration (hardcoded for now) echo " Token expires: 2025-07-28" return 0 else echo "āŒ JWT token not found at $JWT_FILE" echo " Please ensure you have a valid JWT token" return 1 fi } # Check Playwright installation check_playwright() { if npm list playwright &>/dev/null; then echo "āœ… Playwright is installed" return 0 else echo "āš ļø Playwright not found, installing..." npm install playwright npx playwright install chromium echo "āœ… Playwright installed" fi } # Main execution echo "" echo "šŸ“‹ Pre-flight checks:" echo "--------------------" # Check JWT token if ! check_jwt_token; then exit 1 fi # Check Playwright check_playwright # Check/Start JWT server if ! check_jwt_server; then start_jwt_server fi echo "" echo "šŸŽÆ Starting Browser Automation MCP Server..." echo "-------------------------------------------" echo "" # Start the MCP server npm run mcp:browser-automation # Cleanup function cleanup() { echo "" echo "šŸ›‘ Shutting down..." if [ ! -z "$JWT_PID" ]; then echo " Stopping JWT server (PID: $JWT_PID)" kill $JWT_PID 2>/dev/null fi exit 0 } # Set up cleanup on exit trap cleanup EXIT INT TERM

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rkm097git/euconquisto-composer-mcp-poc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server