We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/marianfoo/mcp-sap-notes'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test-headless-fix.shβ’1.35 KiB
#!/bin/bash
# Test Script to Verify Headless Mode Fix
echo "π§ͺ Testing Headless Mode Fix for Docker Containers"
echo "================================================"
echo ""
# Test 1: Basic environment detection
echo "π Environment Detection Test:"
echo "Platform: $(uname -s)"
echo "Architecture: $(uname -m)"
echo "Docker env: ${DOCKER_ENV:-NOT_SET}"
echo "Display: ${DISPLAY:-NOT_SET}"
echo "TTY stdin: $(tty <&0 2>/dev/null && echo 'YES' || echo 'NO')"
echo "CI: ${CI:-NOT_SET}"
echo ""
# Test 2: Run auth test (should work)
echo "π Running authentication test..."
if npm run test:auth 2>&1 | tail -10; then
echo "β Authentication test passed"
else
echo "β Authentication test failed"
fi
echo ""
# Test 3: Run MCP test with debug mode
echo "π§ Running MCP test with debug logging..."
echo "This will show detailed browser launch configuration:"
echo ""
# Set container environment and debug mode
export DOCKER_ENV=true
export LOG_LEVEL=debug
# Run the MCP test
echo "Starting MCP test with container detection..."
npm run test:mcp:debug 2>&1 | head -50
echo ""
echo "π― Test completed! Check the output above for:"
echo "1. β Container detection: true"
echo "2. β Force headless: true"
echo "3. β Final headless: true"
echo "4. β No X server errors"
echo ""
echo "If you see 'Missing X server' errors, the fix needs further adjustment."