fix(mcp): validate oauth callback port range

This commit is contained in:
Shoubhit Dash 2026-05-22 16:45:40 +05:30
parent bca26b0094
commit b4344098de

View file

@ -26,7 +26,7 @@ export const OAuth = Schema.Struct({
description: "OAuth client secret (if required by the authorization server)",
}),
scope: Schema.optional(Schema.String).annotate({ description: "OAuth scopes to request during authorization" }),
callbackPort: Schema.optional(PositiveInt).annotate({
callbackPort: Schema.optional(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 65535 }))).annotate({
description:
"Port for the local OAuth callback server (default: 19876). Shorthand for redirectUri when only the port needs changing. Ignored if redirectUri is set.",
}),