@@ -108,11 +108,14 @@ jobs:
108108 curl -fsS http://127.0.0.1:6566/health >/dev/null
109109 - name : Validate MCP endpoint
110110 run : |
111- rm -f /tmp/mcp_headers /tmp/mcp_headers2
111+ rm -f /tmp/mcp_headers /tmp/mcp_headers2 /tmp/mcp_body2
112112
113113 curl -sS -D /tmp/mcp_headers -o /dev/null --max-time 10 \
114- -H "Accept: text/event-stream, application/json" \
114+ -X POST \
115+ -H "Accept: application/json, text/event-stream" \
116+ -H "Content-Type: application/json" \
115117 -H "mcp-protocol-version: 2025-03-26" \
118+ --data '{}' \
116119 http://127.0.0.1:6566/mcp || true
117120
118121 SESSION_ID=$(grep -i "^mcp-session-id:" /tmp/mcp_headers | head -1 | awk '{print $2}' | tr -d '\r')
@@ -121,22 +124,18 @@ jobs:
121124 exit 1
122125 fi
123126
124- for i in $(seq 1 10); do
125- rm -f /tmp/mcp_headers2
126- curl -sS -D /tmp/mcp_headers2 -o /dev/null --max-time 10 \
127- -H "Accept: text/event-stream, application/json" \
128- -H "mcp-protocol-version: 2025-03-26" \
129- -H "mcp-session-id: ${SESSION_ID}" \
130- http://127.0.0.1:6566/mcp || true
131- if grep -Eq "^HTTP/.* 200" /tmp/mcp_headers2 && grep -Eiq "^content-type: text/event-stream" /tmp/mcp_headers2; then
132- exit 0
133- fi
134- sleep 1
135- done
127+ curl -sS -D /tmp/mcp_headers2 -o /tmp/mcp_body2 --max-time 10 \
128+ -X POST \
129+ -H "Accept: application/json, text/event-stream" \
130+ -H "Content-Type: application/json" \
131+ -H "mcp-protocol-version: 2025-03-26" \
132+ -H "mcp-session-id: ${SESSION_ID}" \
133+ --data '{}' \
134+ http://127.0.0.1:6566/mcp || true
136135
137- cat /tmp/mcp_headers || true
138- cat / tmp/mcp_headers2 || true
139- exit 1
136+ grep -Eq "^HTTP/.* 400" /tmp/mcp_headers2
137+ grep -Eiq "^content-type: application/json" / tmp/mcp_headers2
138+ grep -Eiq "^mcp-session-id: ${SESSION_ID}" /tmp/mcp_headers2
140139 - name : Stop feature server
141140 if : always()
142141 run : |
0 commit comments