diff --git a/packages/opencode/src/config/mcp.ts b/packages/opencode/src/config/mcp.ts index ae558a76b2..2a49745dd8 100644 --- a/packages/opencode/src/config/mcp.ts +++ b/packages/opencode/src/config/mcp.ts @@ -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.", }),