Skip to content

Commit ae9ec46

Browse files
committed
fix: Send a valid ping request instead of empty object
1 parent 3b9054a commit ae9ec46

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

e2e_tests/python/server_clients/automated_oauth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,10 @@ async def _discover_scope_and_auth_server(self, server_url: str) -> tuple[str, s
371371
async with httpx.AsyncClient() as client:
372372
headers = {MCP_PROTOCOL_VERSION: LATEST_PROTOCOL_VERSION}
373373
response = await client.post(
374-
server_url, headers=headers, follow_redirects=True, json={}
374+
server_url,
375+
headers=headers,
376+
follow_redirects=True,
377+
json={"jsonrpc": "2.0", "method": "ping", "id": 1},
375378
)
376379

377380
if response.status_code != 401:

e2e_tests/typescript/src/server_clients/automated_oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export class AutomatedOAuthClient extends Server {
466466
headers: {
467467
"Content-Type": "application/json",
468468
},
469-
body: JSON.stringify({}),
469+
body: JSON.stringify({ jsonrpc: "2.0", method: "ping", id: 1 }),
470470
});
471471
const resourceMetadataUrl = extractResourceMetadataUrl(response);
472472

0 commit comments

Comments
 (0)