fix simpleStreamableHttp.ts

This commit is contained in:
Olivier Chafik 2025-06-18 11:50:29 +01:00
commit e5b2a5b880
No known key found for this signature in database

View file

@ -311,8 +311,8 @@ if (useOAuth) {
const data = await response.json();
if (strictOAuth) {
throw new Error('Resource Indicator (RFC8707) missing');
if (!data.aud) {
throw new Error(`Resource Indicator (RFC8707) missing`);
}
if (data.aud !== mcpServerUrl.href) {
throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.aud}`);