Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions actions/setup/sh/check_mcp_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,22 @@ while IFS= read -r SERVER_NAME; do
continue
fi

# Extract server URL (should be HTTP URL pointing to gateway)
SERVER_URL=$(echo "$SERVER_CONFIG" | jq -r '.url // empty' 2>/dev/null)
# Check if server is HTTP-based (has type "http" or has a URL field)
# Skip stdio servers that haven't been converted to HTTP by the gateway
SERVER_TYPE=$(echo "$SERVER_CONFIG" | jq -r '.type // empty' 2>/dev/null)
SERVER_URL_FROM_CONFIG=$(echo "$SERVER_CONFIG" | jq -r '.url // empty' 2>/dev/null)

if [ -z "$SERVER_URL" ] || [ "$SERVER_URL" = "null" ]; then
if [ "$SERVER_TYPE" != "http" ] && [ -z "$SERVER_URL_FROM_CONFIG" ]; then
echo "⚠ $SERVER_NAME: skipped (not HTTP)"
SERVERS_SKIPPED=$((SERVERS_SKIPPED + 1))
continue
fi

# Construct server URL from GATEWAY_URL and server name
# Instead of using the URL from config (which may be 0.0.0.0), construct it from the gateway URL
# Pattern: http://gateway-url/mcp/server-name
SERVER_URL="${GATEWAY_URL}/mcp/${SERVER_NAME}"

# Extract authentication headers from gateway configuration
AUTH_HEADER=""
if echo "$SERVER_CONFIG" | jq -e '.headers.Authorization' >/dev/null 2>&1; then
Expand Down