librechat-data-provider 0.8.502 → 0.8.503

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,16 +34,16 @@ export declare const StdioOptionsSchema: z.ZodObject<{
34
34
  /**
35
35
  * OAuth configuration for SSE and Streamable HTTP transports
36
36
  * - Optional: OAuth can be auto-discovered on 401 responses
37
- * - Pre-configured values will skip discovery steps
37
+ * - Pre-configured confidential clients must pin both OAuth endpoints
38
38
  */
39
- oauth: z.ZodOptional<z.ZodObject<{
39
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
40
40
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
41
41
  authorization_url: z.ZodOptional<z.ZodString>;
42
42
  /** OAuth token endpoint (optional - can be auto-discovered) */
43
43
  token_url: z.ZodOptional<z.ZodString>;
44
44
  /** OAuth client ID (optional - can use dynamic registration) */
45
45
  client_id: z.ZodOptional<z.ZodString>;
46
- /** OAuth client secret (optional - can use dynamic registration) */
46
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
47
47
  client_secret: z.ZodOptional<z.ZodString>;
48
48
  /** OAuth scopes to request */
49
49
  scope: z.ZodOptional<z.ZodString>;
@@ -61,6 +61,43 @@ export declare const StdioOptionsSchema: z.ZodObject<{
61
61
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
62
62
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
63
63
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
64
+ /**
65
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
66
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
67
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
68
+ * automatically from Protected Resource Metadata) is the standards-conformant
69
+ * route; `audience` covers the providers that ignore it.
70
+ *
71
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
72
+ * and DCR-discovered paths). Whether it is also forwarded on the
73
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
74
+ *
75
+ * The `authorization_code` exchange intentionally never receives `audience` —
76
+ * Auth0 binds audience from the original `/authorize` request and embeds it
77
+ * in the issued access token; sending it again is redundant.
78
+ *
79
+ * No canonicalization is applied — the audience identifier is provider-defined
80
+ * and may differ from the MCP server URL. This field is only accepted from
81
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
82
+ */
83
+ audience: z.ZodOptional<z.ZodString>;
84
+ /**
85
+ * Whether to also forward `audience` on the `refresh_token` grant body.
86
+ *
87
+ * Default: `true`. Required for Auth0, which strips the API audience from
88
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
89
+ * — without it the next MCP call 401s once the initial access token expires.
90
+ *
91
+ * Set to `false` for providers that document refresh requests as
92
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
93
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
94
+ * `aud` claim across refreshes when the initial token was resource-bound,
95
+ * so the extra parameter is redundant and may be rejected as
96
+ * `invalid_request`.
97
+ *
98
+ * Ignored when `audience` itself is not configured.
99
+ */
100
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
64
101
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
65
102
  revocation_endpoint: z.ZodOptional<z.ZodString>;
66
103
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -78,6 +115,8 @@ export declare const StdioOptionsSchema: z.ZodObject<{
78
115
  response_types_supported?: string[] | undefined;
79
116
  code_challenge_methods_supported?: string[] | undefined;
80
117
  skip_code_challenge_check?: boolean | undefined;
118
+ audience?: string | undefined;
119
+ forward_audience_on_refresh?: boolean | undefined;
81
120
  revocation_endpoint?: string | undefined;
82
121
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
83
122
  }, {
@@ -93,6 +132,42 @@ export declare const StdioOptionsSchema: z.ZodObject<{
93
132
  response_types_supported?: string[] | undefined;
94
133
  code_challenge_methods_supported?: string[] | undefined;
95
134
  skip_code_challenge_check?: boolean | undefined;
135
+ audience?: string | undefined;
136
+ forward_audience_on_refresh?: boolean | undefined;
137
+ revocation_endpoint?: string | undefined;
138
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
139
+ }>, {
140
+ authorization_url?: string | undefined;
141
+ token_url?: string | undefined;
142
+ client_id?: string | undefined;
143
+ client_secret?: string | undefined;
144
+ scope?: string | undefined;
145
+ redirect_uri?: string | undefined;
146
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
147
+ grant_types_supported?: string[] | undefined;
148
+ token_endpoint_auth_methods_supported?: string[] | undefined;
149
+ response_types_supported?: string[] | undefined;
150
+ code_challenge_methods_supported?: string[] | undefined;
151
+ skip_code_challenge_check?: boolean | undefined;
152
+ audience?: string | undefined;
153
+ forward_audience_on_refresh?: boolean | undefined;
154
+ revocation_endpoint?: string | undefined;
155
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
156
+ }, {
157
+ authorization_url?: string | undefined;
158
+ token_url?: string | undefined;
159
+ client_id?: string | undefined;
160
+ client_secret?: string | undefined;
161
+ scope?: string | undefined;
162
+ redirect_uri?: string | undefined;
163
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
164
+ grant_types_supported?: string[] | undefined;
165
+ token_endpoint_auth_methods_supported?: string[] | undefined;
166
+ response_types_supported?: string[] | undefined;
167
+ code_challenge_methods_supported?: string[] | undefined;
168
+ skip_code_challenge_check?: boolean | undefined;
169
+ audience?: string | undefined;
170
+ forward_audience_on_refresh?: boolean | undefined;
96
171
  revocation_endpoint?: string | undefined;
97
172
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
98
173
  }>>;
@@ -183,6 +258,8 @@ export declare const StdioOptionsSchema: z.ZodObject<{
183
258
  response_types_supported?: string[] | undefined;
184
259
  code_challenge_methods_supported?: string[] | undefined;
185
260
  skip_code_challenge_check?: boolean | undefined;
261
+ audience?: string | undefined;
262
+ forward_audience_on_refresh?: boolean | undefined;
186
263
  revocation_endpoint?: string | undefined;
187
264
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
188
265
  } | undefined;
@@ -202,6 +279,7 @@ export declare const StdioOptionsSchema: z.ZodObject<{
202
279
  }, {
203
280
  command: string;
204
281
  args: string[];
282
+ type?: "stdio" | undefined;
205
283
  title?: string | undefined;
206
284
  description?: string | undefined;
207
285
  startup?: boolean | undefined;
@@ -210,7 +288,6 @@ export declare const StdioOptionsSchema: z.ZodObject<{
210
288
  sseReadTimeout?: number | undefined;
211
289
  initTimeout?: number | undefined;
212
290
  chatMenu?: boolean | undefined;
213
- type?: "stdio" | undefined;
214
291
  serverInstructions?: string | boolean | undefined;
215
292
  requiresOAuth?: boolean | undefined;
216
293
  oauth?: {
@@ -226,6 +303,8 @@ export declare const StdioOptionsSchema: z.ZodObject<{
226
303
  response_types_supported?: string[] | undefined;
227
304
  code_challenge_methods_supported?: string[] | undefined;
228
305
  skip_code_challenge_check?: boolean | undefined;
306
+ audience?: string | undefined;
307
+ forward_audience_on_refresh?: boolean | undefined;
229
308
  revocation_endpoint?: string | undefined;
230
309
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
231
310
  } | undefined;
@@ -277,16 +356,16 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
277
356
  /**
278
357
  * OAuth configuration for SSE and Streamable HTTP transports
279
358
  * - Optional: OAuth can be auto-discovered on 401 responses
280
- * - Pre-configured values will skip discovery steps
359
+ * - Pre-configured confidential clients must pin both OAuth endpoints
281
360
  */
282
- oauth: z.ZodOptional<z.ZodObject<{
361
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
283
362
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
284
363
  authorization_url: z.ZodOptional<z.ZodString>;
285
364
  /** OAuth token endpoint (optional - can be auto-discovered) */
286
365
  token_url: z.ZodOptional<z.ZodString>;
287
366
  /** OAuth client ID (optional - can use dynamic registration) */
288
367
  client_id: z.ZodOptional<z.ZodString>;
289
- /** OAuth client secret (optional - can use dynamic registration) */
368
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
290
369
  client_secret: z.ZodOptional<z.ZodString>;
291
370
  /** OAuth scopes to request */
292
371
  scope: z.ZodOptional<z.ZodString>;
@@ -304,6 +383,43 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
304
383
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
305
384
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
306
385
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
386
+ /**
387
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
388
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
389
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
390
+ * automatically from Protected Resource Metadata) is the standards-conformant
391
+ * route; `audience` covers the providers that ignore it.
392
+ *
393
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
394
+ * and DCR-discovered paths). Whether it is also forwarded on the
395
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
396
+ *
397
+ * The `authorization_code` exchange intentionally never receives `audience` —
398
+ * Auth0 binds audience from the original `/authorize` request and embeds it
399
+ * in the issued access token; sending it again is redundant.
400
+ *
401
+ * No canonicalization is applied — the audience identifier is provider-defined
402
+ * and may differ from the MCP server URL. This field is only accepted from
403
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
404
+ */
405
+ audience: z.ZodOptional<z.ZodString>;
406
+ /**
407
+ * Whether to also forward `audience` on the `refresh_token` grant body.
408
+ *
409
+ * Default: `true`. Required for Auth0, which strips the API audience from
410
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
411
+ * — without it the next MCP call 401s once the initial access token expires.
412
+ *
413
+ * Set to `false` for providers that document refresh requests as
414
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
415
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
416
+ * `aud` claim across refreshes when the initial token was resource-bound,
417
+ * so the extra parameter is redundant and may be rejected as
418
+ * `invalid_request`.
419
+ *
420
+ * Ignored when `audience` itself is not configured.
421
+ */
422
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
307
423
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
308
424
  revocation_endpoint: z.ZodOptional<z.ZodString>;
309
425
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -321,6 +437,42 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
321
437
  response_types_supported?: string[] | undefined;
322
438
  code_challenge_methods_supported?: string[] | undefined;
323
439
  skip_code_challenge_check?: boolean | undefined;
440
+ audience?: string | undefined;
441
+ forward_audience_on_refresh?: boolean | undefined;
442
+ revocation_endpoint?: string | undefined;
443
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
444
+ }, {
445
+ authorization_url?: string | undefined;
446
+ token_url?: string | undefined;
447
+ client_id?: string | undefined;
448
+ client_secret?: string | undefined;
449
+ scope?: string | undefined;
450
+ redirect_uri?: string | undefined;
451
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
452
+ grant_types_supported?: string[] | undefined;
453
+ token_endpoint_auth_methods_supported?: string[] | undefined;
454
+ response_types_supported?: string[] | undefined;
455
+ code_challenge_methods_supported?: string[] | undefined;
456
+ skip_code_challenge_check?: boolean | undefined;
457
+ audience?: string | undefined;
458
+ forward_audience_on_refresh?: boolean | undefined;
459
+ revocation_endpoint?: string | undefined;
460
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
461
+ }>, {
462
+ authorization_url?: string | undefined;
463
+ token_url?: string | undefined;
464
+ client_id?: string | undefined;
465
+ client_secret?: string | undefined;
466
+ scope?: string | undefined;
467
+ redirect_uri?: string | undefined;
468
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
469
+ grant_types_supported?: string[] | undefined;
470
+ token_endpoint_auth_methods_supported?: string[] | undefined;
471
+ response_types_supported?: string[] | undefined;
472
+ code_challenge_methods_supported?: string[] | undefined;
473
+ skip_code_challenge_check?: boolean | undefined;
474
+ audience?: string | undefined;
475
+ forward_audience_on_refresh?: boolean | undefined;
324
476
  revocation_endpoint?: string | undefined;
325
477
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
326
478
  }, {
@@ -336,6 +488,8 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
336
488
  response_types_supported?: string[] | undefined;
337
489
  code_challenge_methods_supported?: string[] | undefined;
338
490
  skip_code_challenge_check?: boolean | undefined;
491
+ audience?: string | undefined;
492
+ forward_audience_on_refresh?: boolean | undefined;
339
493
  revocation_endpoint?: string | undefined;
340
494
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
341
495
  }>>;
@@ -405,6 +559,8 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
405
559
  response_types_supported?: string[] | undefined;
406
560
  code_challenge_methods_supported?: string[] | undefined;
407
561
  skip_code_challenge_check?: boolean | undefined;
562
+ audience?: string | undefined;
563
+ forward_audience_on_refresh?: boolean | undefined;
408
564
  revocation_endpoint?: string | undefined;
409
565
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
410
566
  } | undefined;
@@ -421,6 +577,7 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
421
577
  }> | undefined;
422
578
  }, {
423
579
  url: string;
580
+ type?: "websocket" | undefined;
424
581
  title?: string | undefined;
425
582
  description?: string | undefined;
426
583
  startup?: boolean | undefined;
@@ -429,7 +586,6 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
429
586
  sseReadTimeout?: number | undefined;
430
587
  initTimeout?: number | undefined;
431
588
  chatMenu?: boolean | undefined;
432
- type?: "websocket" | undefined;
433
589
  serverInstructions?: string | boolean | undefined;
434
590
  requiresOAuth?: boolean | undefined;
435
591
  oauth?: {
@@ -445,6 +601,8 @@ export declare const WebSocketOptionsSchema: z.ZodObject<{
445
601
  response_types_supported?: string[] | undefined;
446
602
  code_challenge_methods_supported?: string[] | undefined;
447
603
  skip_code_challenge_check?: boolean | undefined;
604
+ audience?: string | undefined;
605
+ forward_audience_on_refresh?: boolean | undefined;
448
606
  revocation_endpoint?: string | undefined;
449
607
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
450
608
  } | undefined;
@@ -494,16 +652,16 @@ export declare const SSEOptionsSchema: z.ZodObject<{
494
652
  /**
495
653
  * OAuth configuration for SSE and Streamable HTTP transports
496
654
  * - Optional: OAuth can be auto-discovered on 401 responses
497
- * - Pre-configured values will skip discovery steps
655
+ * - Pre-configured confidential clients must pin both OAuth endpoints
498
656
  */
499
- oauth: z.ZodOptional<z.ZodObject<{
657
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
500
658
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
501
659
  authorization_url: z.ZodOptional<z.ZodString>;
502
660
  /** OAuth token endpoint (optional - can be auto-discovered) */
503
661
  token_url: z.ZodOptional<z.ZodString>;
504
662
  /** OAuth client ID (optional - can use dynamic registration) */
505
663
  client_id: z.ZodOptional<z.ZodString>;
506
- /** OAuth client secret (optional - can use dynamic registration) */
664
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
507
665
  client_secret: z.ZodOptional<z.ZodString>;
508
666
  /** OAuth scopes to request */
509
667
  scope: z.ZodOptional<z.ZodString>;
@@ -521,6 +679,43 @@ export declare const SSEOptionsSchema: z.ZodObject<{
521
679
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
522
680
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
523
681
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
682
+ /**
683
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
684
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
685
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
686
+ * automatically from Protected Resource Metadata) is the standards-conformant
687
+ * route; `audience` covers the providers that ignore it.
688
+ *
689
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
690
+ * and DCR-discovered paths). Whether it is also forwarded on the
691
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
692
+ *
693
+ * The `authorization_code` exchange intentionally never receives `audience` —
694
+ * Auth0 binds audience from the original `/authorize` request and embeds it
695
+ * in the issued access token; sending it again is redundant.
696
+ *
697
+ * No canonicalization is applied — the audience identifier is provider-defined
698
+ * and may differ from the MCP server URL. This field is only accepted from
699
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
700
+ */
701
+ audience: z.ZodOptional<z.ZodString>;
702
+ /**
703
+ * Whether to also forward `audience` on the `refresh_token` grant body.
704
+ *
705
+ * Default: `true`. Required for Auth0, which strips the API audience from
706
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
707
+ * — without it the next MCP call 401s once the initial access token expires.
708
+ *
709
+ * Set to `false` for providers that document refresh requests as
710
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
711
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
712
+ * `aud` claim across refreshes when the initial token was resource-bound,
713
+ * so the extra parameter is redundant and may be rejected as
714
+ * `invalid_request`.
715
+ *
716
+ * Ignored when `audience` itself is not configured.
717
+ */
718
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
524
719
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
525
720
  revocation_endpoint: z.ZodOptional<z.ZodString>;
526
721
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -538,6 +733,42 @@ export declare const SSEOptionsSchema: z.ZodObject<{
538
733
  response_types_supported?: string[] | undefined;
539
734
  code_challenge_methods_supported?: string[] | undefined;
540
735
  skip_code_challenge_check?: boolean | undefined;
736
+ audience?: string | undefined;
737
+ forward_audience_on_refresh?: boolean | undefined;
738
+ revocation_endpoint?: string | undefined;
739
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
740
+ }, {
741
+ authorization_url?: string | undefined;
742
+ token_url?: string | undefined;
743
+ client_id?: string | undefined;
744
+ client_secret?: string | undefined;
745
+ scope?: string | undefined;
746
+ redirect_uri?: string | undefined;
747
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
748
+ grant_types_supported?: string[] | undefined;
749
+ token_endpoint_auth_methods_supported?: string[] | undefined;
750
+ response_types_supported?: string[] | undefined;
751
+ code_challenge_methods_supported?: string[] | undefined;
752
+ skip_code_challenge_check?: boolean | undefined;
753
+ audience?: string | undefined;
754
+ forward_audience_on_refresh?: boolean | undefined;
755
+ revocation_endpoint?: string | undefined;
756
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
757
+ }>, {
758
+ authorization_url?: string | undefined;
759
+ token_url?: string | undefined;
760
+ client_id?: string | undefined;
761
+ client_secret?: string | undefined;
762
+ scope?: string | undefined;
763
+ redirect_uri?: string | undefined;
764
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
765
+ grant_types_supported?: string[] | undefined;
766
+ token_endpoint_auth_methods_supported?: string[] | undefined;
767
+ response_types_supported?: string[] | undefined;
768
+ code_challenge_methods_supported?: string[] | undefined;
769
+ skip_code_challenge_check?: boolean | undefined;
770
+ audience?: string | undefined;
771
+ forward_audience_on_refresh?: boolean | undefined;
541
772
  revocation_endpoint?: string | undefined;
542
773
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
543
774
  }, {
@@ -553,6 +784,8 @@ export declare const SSEOptionsSchema: z.ZodObject<{
553
784
  response_types_supported?: string[] | undefined;
554
785
  code_challenge_methods_supported?: string[] | undefined;
555
786
  skip_code_challenge_check?: boolean | undefined;
787
+ audience?: string | undefined;
788
+ forward_audience_on_refresh?: boolean | undefined;
556
789
  revocation_endpoint?: string | undefined;
557
790
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
558
791
  }>>;
@@ -596,6 +829,8 @@ export declare const SSEOptionsSchema: z.ZodObject<{
596
829
  } & {
597
830
  type: z.ZodDefault<z.ZodLiteral<"sse">>;
598
831
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
832
+ /** Optional outbound proxy URL for this remote MCP transport */
833
+ proxy: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
599
834
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
600
835
  }, "strip", z.ZodTypeAny, {
601
836
  type: "sse";
@@ -623,6 +858,8 @@ export declare const SSEOptionsSchema: z.ZodObject<{
623
858
  response_types_supported?: string[] | undefined;
624
859
  code_challenge_methods_supported?: string[] | undefined;
625
860
  skip_code_challenge_check?: boolean | undefined;
861
+ audience?: string | undefined;
862
+ forward_audience_on_refresh?: boolean | undefined;
626
863
  revocation_endpoint?: string | undefined;
627
864
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
628
865
  } | undefined;
@@ -638,8 +875,10 @@ export declare const SSEOptionsSchema: z.ZodObject<{
638
875
  description: string;
639
876
  }> | undefined;
640
877
  headers?: Record<string, string> | undefined;
878
+ proxy?: string | undefined;
641
879
  }, {
642
880
  url: string;
881
+ type?: "sse" | undefined;
643
882
  title?: string | undefined;
644
883
  description?: string | undefined;
645
884
  startup?: boolean | undefined;
@@ -648,7 +887,6 @@ export declare const SSEOptionsSchema: z.ZodObject<{
648
887
  sseReadTimeout?: number | undefined;
649
888
  initTimeout?: number | undefined;
650
889
  chatMenu?: boolean | undefined;
651
- type?: "sse" | undefined;
652
890
  serverInstructions?: string | boolean | undefined;
653
891
  requiresOAuth?: boolean | undefined;
654
892
  oauth?: {
@@ -664,6 +902,8 @@ export declare const SSEOptionsSchema: z.ZodObject<{
664
902
  response_types_supported?: string[] | undefined;
665
903
  code_challenge_methods_supported?: string[] | undefined;
666
904
  skip_code_challenge_check?: boolean | undefined;
905
+ audience?: string | undefined;
906
+ forward_audience_on_refresh?: boolean | undefined;
667
907
  revocation_endpoint?: string | undefined;
668
908
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
669
909
  } | undefined;
@@ -679,6 +919,7 @@ export declare const SSEOptionsSchema: z.ZodObject<{
679
919
  description: string;
680
920
  }> | undefined;
681
921
  headers?: Record<string, string> | undefined;
922
+ proxy?: string | undefined;
682
923
  }>;
683
924
  export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
684
925
  /** Display name for the MCP server - only letters, numbers, and spaces allowed */
@@ -714,16 +955,16 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
714
955
  /**
715
956
  * OAuth configuration for SSE and Streamable HTTP transports
716
957
  * - Optional: OAuth can be auto-discovered on 401 responses
717
- * - Pre-configured values will skip discovery steps
958
+ * - Pre-configured confidential clients must pin both OAuth endpoints
718
959
  */
719
- oauth: z.ZodOptional<z.ZodObject<{
960
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
720
961
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
721
962
  authorization_url: z.ZodOptional<z.ZodString>;
722
963
  /** OAuth token endpoint (optional - can be auto-discovered) */
723
964
  token_url: z.ZodOptional<z.ZodString>;
724
965
  /** OAuth client ID (optional - can use dynamic registration) */
725
966
  client_id: z.ZodOptional<z.ZodString>;
726
- /** OAuth client secret (optional - can use dynamic registration) */
967
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
727
968
  client_secret: z.ZodOptional<z.ZodString>;
728
969
  /** OAuth scopes to request */
729
970
  scope: z.ZodOptional<z.ZodString>;
@@ -741,6 +982,43 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
741
982
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
742
983
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
743
984
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
985
+ /**
986
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
987
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
988
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
989
+ * automatically from Protected Resource Metadata) is the standards-conformant
990
+ * route; `audience` covers the providers that ignore it.
991
+ *
992
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
993
+ * and DCR-discovered paths). Whether it is also forwarded on the
994
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
995
+ *
996
+ * The `authorization_code` exchange intentionally never receives `audience` —
997
+ * Auth0 binds audience from the original `/authorize` request and embeds it
998
+ * in the issued access token; sending it again is redundant.
999
+ *
1000
+ * No canonicalization is applied — the audience identifier is provider-defined
1001
+ * and may differ from the MCP server URL. This field is only accepted from
1002
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
1003
+ */
1004
+ audience: z.ZodOptional<z.ZodString>;
1005
+ /**
1006
+ * Whether to also forward `audience` on the `refresh_token` grant body.
1007
+ *
1008
+ * Default: `true`. Required for Auth0, which strips the API audience from
1009
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
1010
+ * — without it the next MCP call 401s once the initial access token expires.
1011
+ *
1012
+ * Set to `false` for providers that document refresh requests as
1013
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
1014
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
1015
+ * `aud` claim across refreshes when the initial token was resource-bound,
1016
+ * so the extra parameter is redundant and may be rejected as
1017
+ * `invalid_request`.
1018
+ *
1019
+ * Ignored when `audience` itself is not configured.
1020
+ */
1021
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
744
1022
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
745
1023
  revocation_endpoint: z.ZodOptional<z.ZodString>;
746
1024
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -758,6 +1036,42 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
758
1036
  response_types_supported?: string[] | undefined;
759
1037
  code_challenge_methods_supported?: string[] | undefined;
760
1038
  skip_code_challenge_check?: boolean | undefined;
1039
+ audience?: string | undefined;
1040
+ forward_audience_on_refresh?: boolean | undefined;
1041
+ revocation_endpoint?: string | undefined;
1042
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1043
+ }, {
1044
+ authorization_url?: string | undefined;
1045
+ token_url?: string | undefined;
1046
+ client_id?: string | undefined;
1047
+ client_secret?: string | undefined;
1048
+ scope?: string | undefined;
1049
+ redirect_uri?: string | undefined;
1050
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1051
+ grant_types_supported?: string[] | undefined;
1052
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1053
+ response_types_supported?: string[] | undefined;
1054
+ code_challenge_methods_supported?: string[] | undefined;
1055
+ skip_code_challenge_check?: boolean | undefined;
1056
+ audience?: string | undefined;
1057
+ forward_audience_on_refresh?: boolean | undefined;
1058
+ revocation_endpoint?: string | undefined;
1059
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1060
+ }>, {
1061
+ authorization_url?: string | undefined;
1062
+ token_url?: string | undefined;
1063
+ client_id?: string | undefined;
1064
+ client_secret?: string | undefined;
1065
+ scope?: string | undefined;
1066
+ redirect_uri?: string | undefined;
1067
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1068
+ grant_types_supported?: string[] | undefined;
1069
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1070
+ response_types_supported?: string[] | undefined;
1071
+ code_challenge_methods_supported?: string[] | undefined;
1072
+ skip_code_challenge_check?: boolean | undefined;
1073
+ audience?: string | undefined;
1074
+ forward_audience_on_refresh?: boolean | undefined;
761
1075
  revocation_endpoint?: string | undefined;
762
1076
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
763
1077
  }, {
@@ -773,6 +1087,8 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
773
1087
  response_types_supported?: string[] | undefined;
774
1088
  code_challenge_methods_supported?: string[] | undefined;
775
1089
  skip_code_challenge_check?: boolean | undefined;
1090
+ audience?: string | undefined;
1091
+ forward_audience_on_refresh?: boolean | undefined;
776
1092
  revocation_endpoint?: string | undefined;
777
1093
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
778
1094
  }>>;
@@ -816,6 +1132,8 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
816
1132
  } & {
817
1133
  type: z.ZodUnion<[z.ZodLiteral<"streamable-http">, z.ZodLiteral<"http">]>;
818
1134
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1135
+ /** Optional outbound proxy URL for this remote MCP transport */
1136
+ proxy: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
819
1137
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
820
1138
  }, "strip", z.ZodTypeAny, {
821
1139
  type: "streamable-http" | "http";
@@ -843,6 +1161,8 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
843
1161
  response_types_supported?: string[] | undefined;
844
1162
  code_challenge_methods_supported?: string[] | undefined;
845
1163
  skip_code_challenge_check?: boolean | undefined;
1164
+ audience?: string | undefined;
1165
+ forward_audience_on_refresh?: boolean | undefined;
846
1166
  revocation_endpoint?: string | undefined;
847
1167
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
848
1168
  } | undefined;
@@ -858,6 +1178,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
858
1178
  description: string;
859
1179
  }> | undefined;
860
1180
  headers?: Record<string, string> | undefined;
1181
+ proxy?: string | undefined;
861
1182
  }, {
862
1183
  type: "streamable-http" | "http";
863
1184
  url: string;
@@ -884,6 +1205,8 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
884
1205
  response_types_supported?: string[] | undefined;
885
1206
  code_challenge_methods_supported?: string[] | undefined;
886
1207
  skip_code_challenge_check?: boolean | undefined;
1208
+ audience?: string | undefined;
1209
+ forward_audience_on_refresh?: boolean | undefined;
887
1210
  revocation_endpoint?: string | undefined;
888
1211
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
889
1212
  } | undefined;
@@ -899,6 +1222,7 @@ export declare const StreamableHTTPOptionsSchema: z.ZodObject<{
899
1222
  description: string;
900
1223
  }> | undefined;
901
1224
  headers?: Record<string, string> | undefined;
1225
+ proxy?: string | undefined;
902
1226
  }>;
903
1227
  export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
904
1228
  /** Display name for the MCP server - only letters, numbers, and spaces allowed */
@@ -934,16 +1258,16 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
934
1258
  /**
935
1259
  * OAuth configuration for SSE and Streamable HTTP transports
936
1260
  * - Optional: OAuth can be auto-discovered on 401 responses
937
- * - Pre-configured values will skip discovery steps
1261
+ * - Pre-configured confidential clients must pin both OAuth endpoints
938
1262
  */
939
- oauth: z.ZodOptional<z.ZodObject<{
1263
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
940
1264
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
941
1265
  authorization_url: z.ZodOptional<z.ZodString>;
942
1266
  /** OAuth token endpoint (optional - can be auto-discovered) */
943
1267
  token_url: z.ZodOptional<z.ZodString>;
944
1268
  /** OAuth client ID (optional - can use dynamic registration) */
945
1269
  client_id: z.ZodOptional<z.ZodString>;
946
- /** OAuth client secret (optional - can use dynamic registration) */
1270
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
947
1271
  client_secret: z.ZodOptional<z.ZodString>;
948
1272
  /** OAuth scopes to request */
949
1273
  scope: z.ZodOptional<z.ZodString>;
@@ -961,6 +1285,43 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
961
1285
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
962
1286
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
963
1287
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
1288
+ /**
1289
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
1290
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
1291
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
1292
+ * automatically from Protected Resource Metadata) is the standards-conformant
1293
+ * route; `audience` covers the providers that ignore it.
1294
+ *
1295
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
1296
+ * and DCR-discovered paths). Whether it is also forwarded on the
1297
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
1298
+ *
1299
+ * The `authorization_code` exchange intentionally never receives `audience` —
1300
+ * Auth0 binds audience from the original `/authorize` request and embeds it
1301
+ * in the issued access token; sending it again is redundant.
1302
+ *
1303
+ * No canonicalization is applied — the audience identifier is provider-defined
1304
+ * and may differ from the MCP server URL. This field is only accepted from
1305
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
1306
+ */
1307
+ audience: z.ZodOptional<z.ZodString>;
1308
+ /**
1309
+ * Whether to also forward `audience` on the `refresh_token` grant body.
1310
+ *
1311
+ * Default: `true`. Required for Auth0, which strips the API audience from
1312
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
1313
+ * — without it the next MCP call 401s once the initial access token expires.
1314
+ *
1315
+ * Set to `false` for providers that document refresh requests as
1316
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
1317
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
1318
+ * `aud` claim across refreshes when the initial token was resource-bound,
1319
+ * so the extra parameter is redundant and may be rejected as
1320
+ * `invalid_request`.
1321
+ *
1322
+ * Ignored when `audience` itself is not configured.
1323
+ */
1324
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
964
1325
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
965
1326
  revocation_endpoint: z.ZodOptional<z.ZodString>;
966
1327
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -978,6 +1339,42 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
978
1339
  response_types_supported?: string[] | undefined;
979
1340
  code_challenge_methods_supported?: string[] | undefined;
980
1341
  skip_code_challenge_check?: boolean | undefined;
1342
+ audience?: string | undefined;
1343
+ forward_audience_on_refresh?: boolean | undefined;
1344
+ revocation_endpoint?: string | undefined;
1345
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1346
+ }, {
1347
+ authorization_url?: string | undefined;
1348
+ token_url?: string | undefined;
1349
+ client_id?: string | undefined;
1350
+ client_secret?: string | undefined;
1351
+ scope?: string | undefined;
1352
+ redirect_uri?: string | undefined;
1353
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1354
+ grant_types_supported?: string[] | undefined;
1355
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1356
+ response_types_supported?: string[] | undefined;
1357
+ code_challenge_methods_supported?: string[] | undefined;
1358
+ skip_code_challenge_check?: boolean | undefined;
1359
+ audience?: string | undefined;
1360
+ forward_audience_on_refresh?: boolean | undefined;
1361
+ revocation_endpoint?: string | undefined;
1362
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1363
+ }>, {
1364
+ authorization_url?: string | undefined;
1365
+ token_url?: string | undefined;
1366
+ client_id?: string | undefined;
1367
+ client_secret?: string | undefined;
1368
+ scope?: string | undefined;
1369
+ redirect_uri?: string | undefined;
1370
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1371
+ grant_types_supported?: string[] | undefined;
1372
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1373
+ response_types_supported?: string[] | undefined;
1374
+ code_challenge_methods_supported?: string[] | undefined;
1375
+ skip_code_challenge_check?: boolean | undefined;
1376
+ audience?: string | undefined;
1377
+ forward_audience_on_refresh?: boolean | undefined;
981
1378
  revocation_endpoint?: string | undefined;
982
1379
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
983
1380
  }, {
@@ -993,6 +1390,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
993
1390
  response_types_supported?: string[] | undefined;
994
1391
  code_challenge_methods_supported?: string[] | undefined;
995
1392
  skip_code_challenge_check?: boolean | undefined;
1393
+ audience?: string | undefined;
1394
+ forward_audience_on_refresh?: boolean | undefined;
996
1395
  revocation_endpoint?: string | undefined;
997
1396
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
998
1397
  }>>;
@@ -1083,6 +1482,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1083
1482
  response_types_supported?: string[] | undefined;
1084
1483
  code_challenge_methods_supported?: string[] | undefined;
1085
1484
  skip_code_challenge_check?: boolean | undefined;
1485
+ audience?: string | undefined;
1486
+ forward_audience_on_refresh?: boolean | undefined;
1086
1487
  revocation_endpoint?: string | undefined;
1087
1488
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1088
1489
  } | undefined;
@@ -1102,6 +1503,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1102
1503
  }, {
1103
1504
  command: string;
1104
1505
  args: string[];
1506
+ type?: "stdio" | undefined;
1105
1507
  title?: string | undefined;
1106
1508
  description?: string | undefined;
1107
1509
  startup?: boolean | undefined;
@@ -1110,7 +1512,6 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1110
1512
  sseReadTimeout?: number | undefined;
1111
1513
  initTimeout?: number | undefined;
1112
1514
  chatMenu?: boolean | undefined;
1113
- type?: "stdio" | undefined;
1114
1515
  serverInstructions?: string | boolean | undefined;
1115
1516
  requiresOAuth?: boolean | undefined;
1116
1517
  oauth?: {
@@ -1126,6 +1527,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1126
1527
  response_types_supported?: string[] | undefined;
1127
1528
  code_challenge_methods_supported?: string[] | undefined;
1128
1529
  skip_code_challenge_check?: boolean | undefined;
1530
+ audience?: string | undefined;
1531
+ forward_audience_on_refresh?: boolean | undefined;
1129
1532
  revocation_endpoint?: string | undefined;
1130
1533
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1131
1534
  } | undefined;
@@ -1176,16 +1579,16 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1176
1579
  /**
1177
1580
  * OAuth configuration for SSE and Streamable HTTP transports
1178
1581
  * - Optional: OAuth can be auto-discovered on 401 responses
1179
- * - Pre-configured values will skip discovery steps
1582
+ * - Pre-configured confidential clients must pin both OAuth endpoints
1180
1583
  */
1181
- oauth: z.ZodOptional<z.ZodObject<{
1584
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1182
1585
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
1183
1586
  authorization_url: z.ZodOptional<z.ZodString>;
1184
1587
  /** OAuth token endpoint (optional - can be auto-discovered) */
1185
1588
  token_url: z.ZodOptional<z.ZodString>;
1186
1589
  /** OAuth client ID (optional - can use dynamic registration) */
1187
1590
  client_id: z.ZodOptional<z.ZodString>;
1188
- /** OAuth client secret (optional - can use dynamic registration) */
1591
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
1189
1592
  client_secret: z.ZodOptional<z.ZodString>;
1190
1593
  /** OAuth scopes to request */
1191
1594
  scope: z.ZodOptional<z.ZodString>;
@@ -1203,6 +1606,43 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1203
1606
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1204
1607
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
1205
1608
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
1609
+ /**
1610
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
1611
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
1612
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
1613
+ * automatically from Protected Resource Metadata) is the standards-conformant
1614
+ * route; `audience` covers the providers that ignore it.
1615
+ *
1616
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
1617
+ * and DCR-discovered paths). Whether it is also forwarded on the
1618
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
1619
+ *
1620
+ * The `authorization_code` exchange intentionally never receives `audience` —
1621
+ * Auth0 binds audience from the original `/authorize` request and embeds it
1622
+ * in the issued access token; sending it again is redundant.
1623
+ *
1624
+ * No canonicalization is applied — the audience identifier is provider-defined
1625
+ * and may differ from the MCP server URL. This field is only accepted from
1626
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
1627
+ */
1628
+ audience: z.ZodOptional<z.ZodString>;
1629
+ /**
1630
+ * Whether to also forward `audience` on the `refresh_token` grant body.
1631
+ *
1632
+ * Default: `true`. Required for Auth0, which strips the API audience from
1633
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
1634
+ * — without it the next MCP call 401s once the initial access token expires.
1635
+ *
1636
+ * Set to `false` for providers that document refresh requests as
1637
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
1638
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
1639
+ * `aud` claim across refreshes when the initial token was resource-bound,
1640
+ * so the extra parameter is redundant and may be rejected as
1641
+ * `invalid_request`.
1642
+ *
1643
+ * Ignored when `audience` itself is not configured.
1644
+ */
1645
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
1206
1646
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1207
1647
  revocation_endpoint: z.ZodOptional<z.ZodString>;
1208
1648
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1220,6 +1660,42 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1220
1660
  response_types_supported?: string[] | undefined;
1221
1661
  code_challenge_methods_supported?: string[] | undefined;
1222
1662
  skip_code_challenge_check?: boolean | undefined;
1663
+ audience?: string | undefined;
1664
+ forward_audience_on_refresh?: boolean | undefined;
1665
+ revocation_endpoint?: string | undefined;
1666
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1667
+ }, {
1668
+ authorization_url?: string | undefined;
1669
+ token_url?: string | undefined;
1670
+ client_id?: string | undefined;
1671
+ client_secret?: string | undefined;
1672
+ scope?: string | undefined;
1673
+ redirect_uri?: string | undefined;
1674
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1675
+ grant_types_supported?: string[] | undefined;
1676
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1677
+ response_types_supported?: string[] | undefined;
1678
+ code_challenge_methods_supported?: string[] | undefined;
1679
+ skip_code_challenge_check?: boolean | undefined;
1680
+ audience?: string | undefined;
1681
+ forward_audience_on_refresh?: boolean | undefined;
1682
+ revocation_endpoint?: string | undefined;
1683
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1684
+ }>, {
1685
+ authorization_url?: string | undefined;
1686
+ token_url?: string | undefined;
1687
+ client_id?: string | undefined;
1688
+ client_secret?: string | undefined;
1689
+ scope?: string | undefined;
1690
+ redirect_uri?: string | undefined;
1691
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1692
+ grant_types_supported?: string[] | undefined;
1693
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1694
+ response_types_supported?: string[] | undefined;
1695
+ code_challenge_methods_supported?: string[] | undefined;
1696
+ skip_code_challenge_check?: boolean | undefined;
1697
+ audience?: string | undefined;
1698
+ forward_audience_on_refresh?: boolean | undefined;
1223
1699
  revocation_endpoint?: string | undefined;
1224
1700
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1225
1701
  }, {
@@ -1235,6 +1711,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1235
1711
  response_types_supported?: string[] | undefined;
1236
1712
  code_challenge_methods_supported?: string[] | undefined;
1237
1713
  skip_code_challenge_check?: boolean | undefined;
1714
+ audience?: string | undefined;
1715
+ forward_audience_on_refresh?: boolean | undefined;
1238
1716
  revocation_endpoint?: string | undefined;
1239
1717
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1240
1718
  }>>;
@@ -1304,6 +1782,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1304
1782
  response_types_supported?: string[] | undefined;
1305
1783
  code_challenge_methods_supported?: string[] | undefined;
1306
1784
  skip_code_challenge_check?: boolean | undefined;
1785
+ audience?: string | undefined;
1786
+ forward_audience_on_refresh?: boolean | undefined;
1307
1787
  revocation_endpoint?: string | undefined;
1308
1788
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1309
1789
  } | undefined;
@@ -1320,6 +1800,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1320
1800
  }> | undefined;
1321
1801
  }, {
1322
1802
  url: string;
1803
+ type?: "websocket" | undefined;
1323
1804
  title?: string | undefined;
1324
1805
  description?: string | undefined;
1325
1806
  startup?: boolean | undefined;
@@ -1328,7 +1809,6 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1328
1809
  sseReadTimeout?: number | undefined;
1329
1810
  initTimeout?: number | undefined;
1330
1811
  chatMenu?: boolean | undefined;
1331
- type?: "websocket" | undefined;
1332
1812
  serverInstructions?: string | boolean | undefined;
1333
1813
  requiresOAuth?: boolean | undefined;
1334
1814
  oauth?: {
@@ -1344,6 +1824,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1344
1824
  response_types_supported?: string[] | undefined;
1345
1825
  code_challenge_methods_supported?: string[] | undefined;
1346
1826
  skip_code_challenge_check?: boolean | undefined;
1827
+ audience?: string | undefined;
1828
+ forward_audience_on_refresh?: boolean | undefined;
1347
1829
  revocation_endpoint?: string | undefined;
1348
1830
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1349
1831
  } | undefined;
@@ -1392,16 +1874,16 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1392
1874
  /**
1393
1875
  * OAuth configuration for SSE and Streamable HTTP transports
1394
1876
  * - Optional: OAuth can be auto-discovered on 401 responses
1395
- * - Pre-configured values will skip discovery steps
1877
+ * - Pre-configured confidential clients must pin both OAuth endpoints
1396
1878
  */
1397
- oauth: z.ZodOptional<z.ZodObject<{
1879
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1398
1880
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
1399
1881
  authorization_url: z.ZodOptional<z.ZodString>;
1400
1882
  /** OAuth token endpoint (optional - can be auto-discovered) */
1401
1883
  token_url: z.ZodOptional<z.ZodString>;
1402
1884
  /** OAuth client ID (optional - can use dynamic registration) */
1403
1885
  client_id: z.ZodOptional<z.ZodString>;
1404
- /** OAuth client secret (optional - can use dynamic registration) */
1886
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
1405
1887
  client_secret: z.ZodOptional<z.ZodString>;
1406
1888
  /** OAuth scopes to request */
1407
1889
  scope: z.ZodOptional<z.ZodString>;
@@ -1419,6 +1901,43 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1419
1901
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1420
1902
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
1421
1903
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
1904
+ /**
1905
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
1906
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
1907
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
1908
+ * automatically from Protected Resource Metadata) is the standards-conformant
1909
+ * route; `audience` covers the providers that ignore it.
1910
+ *
1911
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
1912
+ * and DCR-discovered paths). Whether it is also forwarded on the
1913
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
1914
+ *
1915
+ * The `authorization_code` exchange intentionally never receives `audience` —
1916
+ * Auth0 binds audience from the original `/authorize` request and embeds it
1917
+ * in the issued access token; sending it again is redundant.
1918
+ *
1919
+ * No canonicalization is applied — the audience identifier is provider-defined
1920
+ * and may differ from the MCP server URL. This field is only accepted from
1921
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
1922
+ */
1923
+ audience: z.ZodOptional<z.ZodString>;
1924
+ /**
1925
+ * Whether to also forward `audience` on the `refresh_token` grant body.
1926
+ *
1927
+ * Default: `true`. Required for Auth0, which strips the API audience from
1928
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
1929
+ * — without it the next MCP call 401s once the initial access token expires.
1930
+ *
1931
+ * Set to `false` for providers that document refresh requests as
1932
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
1933
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
1934
+ * `aud` claim across refreshes when the initial token was resource-bound,
1935
+ * so the extra parameter is redundant and may be rejected as
1936
+ * `invalid_request`.
1937
+ *
1938
+ * Ignored when `audience` itself is not configured.
1939
+ */
1940
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
1422
1941
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1423
1942
  revocation_endpoint: z.ZodOptional<z.ZodString>;
1424
1943
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1436,6 +1955,42 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1436
1955
  response_types_supported?: string[] | undefined;
1437
1956
  code_challenge_methods_supported?: string[] | undefined;
1438
1957
  skip_code_challenge_check?: boolean | undefined;
1958
+ audience?: string | undefined;
1959
+ forward_audience_on_refresh?: boolean | undefined;
1960
+ revocation_endpoint?: string | undefined;
1961
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1962
+ }, {
1963
+ authorization_url?: string | undefined;
1964
+ token_url?: string | undefined;
1965
+ client_id?: string | undefined;
1966
+ client_secret?: string | undefined;
1967
+ scope?: string | undefined;
1968
+ redirect_uri?: string | undefined;
1969
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1970
+ grant_types_supported?: string[] | undefined;
1971
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1972
+ response_types_supported?: string[] | undefined;
1973
+ code_challenge_methods_supported?: string[] | undefined;
1974
+ skip_code_challenge_check?: boolean | undefined;
1975
+ audience?: string | undefined;
1976
+ forward_audience_on_refresh?: boolean | undefined;
1977
+ revocation_endpoint?: string | undefined;
1978
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
1979
+ }>, {
1980
+ authorization_url?: string | undefined;
1981
+ token_url?: string | undefined;
1982
+ client_id?: string | undefined;
1983
+ client_secret?: string | undefined;
1984
+ scope?: string | undefined;
1985
+ redirect_uri?: string | undefined;
1986
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
1987
+ grant_types_supported?: string[] | undefined;
1988
+ token_endpoint_auth_methods_supported?: string[] | undefined;
1989
+ response_types_supported?: string[] | undefined;
1990
+ code_challenge_methods_supported?: string[] | undefined;
1991
+ skip_code_challenge_check?: boolean | undefined;
1992
+ audience?: string | undefined;
1993
+ forward_audience_on_refresh?: boolean | undefined;
1439
1994
  revocation_endpoint?: string | undefined;
1440
1995
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1441
1996
  }, {
@@ -1451,6 +2006,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1451
2006
  response_types_supported?: string[] | undefined;
1452
2007
  code_challenge_methods_supported?: string[] | undefined;
1453
2008
  skip_code_challenge_check?: boolean | undefined;
2009
+ audience?: string | undefined;
2010
+ forward_audience_on_refresh?: boolean | undefined;
1454
2011
  revocation_endpoint?: string | undefined;
1455
2012
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1456
2013
  }>>;
@@ -1494,6 +2051,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1494
2051
  } & {
1495
2052
  type: z.ZodDefault<z.ZodLiteral<"sse">>;
1496
2053
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2054
+ /** Optional outbound proxy URL for this remote MCP transport */
2055
+ proxy: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
1497
2056
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
1498
2057
  }, "strip", z.ZodTypeAny, {
1499
2058
  type: "sse";
@@ -1521,6 +2080,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1521
2080
  response_types_supported?: string[] | undefined;
1522
2081
  code_challenge_methods_supported?: string[] | undefined;
1523
2082
  skip_code_challenge_check?: boolean | undefined;
2083
+ audience?: string | undefined;
2084
+ forward_audience_on_refresh?: boolean | undefined;
1524
2085
  revocation_endpoint?: string | undefined;
1525
2086
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1526
2087
  } | undefined;
@@ -1536,8 +2097,10 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1536
2097
  description: string;
1537
2098
  }> | undefined;
1538
2099
  headers?: Record<string, string> | undefined;
2100
+ proxy?: string | undefined;
1539
2101
  }, {
1540
2102
  url: string;
2103
+ type?: "sse" | undefined;
1541
2104
  title?: string | undefined;
1542
2105
  description?: string | undefined;
1543
2106
  startup?: boolean | undefined;
@@ -1546,7 +2109,6 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1546
2109
  sseReadTimeout?: number | undefined;
1547
2110
  initTimeout?: number | undefined;
1548
2111
  chatMenu?: boolean | undefined;
1549
- type?: "sse" | undefined;
1550
2112
  serverInstructions?: string | boolean | undefined;
1551
2113
  requiresOAuth?: boolean | undefined;
1552
2114
  oauth?: {
@@ -1562,6 +2124,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1562
2124
  response_types_supported?: string[] | undefined;
1563
2125
  code_challenge_methods_supported?: string[] | undefined;
1564
2126
  skip_code_challenge_check?: boolean | undefined;
2127
+ audience?: string | undefined;
2128
+ forward_audience_on_refresh?: boolean | undefined;
1565
2129
  revocation_endpoint?: string | undefined;
1566
2130
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1567
2131
  } | undefined;
@@ -1577,6 +2141,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1577
2141
  description: string;
1578
2142
  }> | undefined;
1579
2143
  headers?: Record<string, string> | undefined;
2144
+ proxy?: string | undefined;
1580
2145
  }>, z.ZodObject<{
1581
2146
  /** Display name for the MCP server - only letters, numbers, and spaces allowed */
1582
2147
  title: z.ZodOptional<z.ZodString>;
@@ -1611,16 +2176,16 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1611
2176
  /**
1612
2177
  * OAuth configuration for SSE and Streamable HTTP transports
1613
2178
  * - Optional: OAuth can be auto-discovered on 401 responses
1614
- * - Pre-configured values will skip discovery steps
2179
+ * - Pre-configured confidential clients must pin both OAuth endpoints
1615
2180
  */
1616
- oauth: z.ZodOptional<z.ZodObject<{
2181
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1617
2182
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
1618
2183
  authorization_url: z.ZodOptional<z.ZodString>;
1619
2184
  /** OAuth token endpoint (optional - can be auto-discovered) */
1620
2185
  token_url: z.ZodOptional<z.ZodString>;
1621
2186
  /** OAuth client ID (optional - can use dynamic registration) */
1622
2187
  client_id: z.ZodOptional<z.ZodString>;
1623
- /** OAuth client secret (optional - can use dynamic registration) */
2188
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
1624
2189
  client_secret: z.ZodOptional<z.ZodString>;
1625
2190
  /** OAuth scopes to request */
1626
2191
  scope: z.ZodOptional<z.ZodString>;
@@ -1638,6 +2203,43 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1638
2203
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1639
2204
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
1640
2205
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
2206
+ /**
2207
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
2208
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
2209
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
2210
+ * automatically from Protected Resource Metadata) is the standards-conformant
2211
+ * route; `audience` covers the providers that ignore it.
2212
+ *
2213
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
2214
+ * and DCR-discovered paths). Whether it is also forwarded on the
2215
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
2216
+ *
2217
+ * The `authorization_code` exchange intentionally never receives `audience` —
2218
+ * Auth0 binds audience from the original `/authorize` request and embeds it
2219
+ * in the issued access token; sending it again is redundant.
2220
+ *
2221
+ * No canonicalization is applied — the audience identifier is provider-defined
2222
+ * and may differ from the MCP server URL. This field is only accepted from
2223
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
2224
+ */
2225
+ audience: z.ZodOptional<z.ZodString>;
2226
+ /**
2227
+ * Whether to also forward `audience` on the `refresh_token` grant body.
2228
+ *
2229
+ * Default: `true`. Required for Auth0, which strips the API audience from
2230
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
2231
+ * — without it the next MCP call 401s once the initial access token expires.
2232
+ *
2233
+ * Set to `false` for providers that document refresh requests as
2234
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
2235
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
2236
+ * `aud` claim across refreshes when the initial token was resource-bound,
2237
+ * so the extra parameter is redundant and may be rejected as
2238
+ * `invalid_request`.
2239
+ *
2240
+ * Ignored when `audience` itself is not configured.
2241
+ */
2242
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
1641
2243
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1642
2244
  revocation_endpoint: z.ZodOptional<z.ZodString>;
1643
2245
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1655,6 +2257,42 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1655
2257
  response_types_supported?: string[] | undefined;
1656
2258
  code_challenge_methods_supported?: string[] | undefined;
1657
2259
  skip_code_challenge_check?: boolean | undefined;
2260
+ audience?: string | undefined;
2261
+ forward_audience_on_refresh?: boolean | undefined;
2262
+ revocation_endpoint?: string | undefined;
2263
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
2264
+ }, {
2265
+ authorization_url?: string | undefined;
2266
+ token_url?: string | undefined;
2267
+ client_id?: string | undefined;
2268
+ client_secret?: string | undefined;
2269
+ scope?: string | undefined;
2270
+ redirect_uri?: string | undefined;
2271
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
2272
+ grant_types_supported?: string[] | undefined;
2273
+ token_endpoint_auth_methods_supported?: string[] | undefined;
2274
+ response_types_supported?: string[] | undefined;
2275
+ code_challenge_methods_supported?: string[] | undefined;
2276
+ skip_code_challenge_check?: boolean | undefined;
2277
+ audience?: string | undefined;
2278
+ forward_audience_on_refresh?: boolean | undefined;
2279
+ revocation_endpoint?: string | undefined;
2280
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
2281
+ }>, {
2282
+ authorization_url?: string | undefined;
2283
+ token_url?: string | undefined;
2284
+ client_id?: string | undefined;
2285
+ client_secret?: string | undefined;
2286
+ scope?: string | undefined;
2287
+ redirect_uri?: string | undefined;
2288
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
2289
+ grant_types_supported?: string[] | undefined;
2290
+ token_endpoint_auth_methods_supported?: string[] | undefined;
2291
+ response_types_supported?: string[] | undefined;
2292
+ code_challenge_methods_supported?: string[] | undefined;
2293
+ skip_code_challenge_check?: boolean | undefined;
2294
+ audience?: string | undefined;
2295
+ forward_audience_on_refresh?: boolean | undefined;
1658
2296
  revocation_endpoint?: string | undefined;
1659
2297
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1660
2298
  }, {
@@ -1670,6 +2308,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1670
2308
  response_types_supported?: string[] | undefined;
1671
2309
  code_challenge_methods_supported?: string[] | undefined;
1672
2310
  skip_code_challenge_check?: boolean | undefined;
2311
+ audience?: string | undefined;
2312
+ forward_audience_on_refresh?: boolean | undefined;
1673
2313
  revocation_endpoint?: string | undefined;
1674
2314
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1675
2315
  }>>;
@@ -1713,6 +2353,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1713
2353
  } & {
1714
2354
  type: z.ZodUnion<[z.ZodLiteral<"streamable-http">, z.ZodLiteral<"http">]>;
1715
2355
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2356
+ /** Optional outbound proxy URL for this remote MCP transport */
2357
+ proxy: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
1716
2358
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
1717
2359
  }, "strip", z.ZodTypeAny, {
1718
2360
  type: "streamable-http" | "http";
@@ -1740,6 +2382,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1740
2382
  response_types_supported?: string[] | undefined;
1741
2383
  code_challenge_methods_supported?: string[] | undefined;
1742
2384
  skip_code_challenge_check?: boolean | undefined;
2385
+ audience?: string | undefined;
2386
+ forward_audience_on_refresh?: boolean | undefined;
1743
2387
  revocation_endpoint?: string | undefined;
1744
2388
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1745
2389
  } | undefined;
@@ -1755,6 +2399,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1755
2399
  description: string;
1756
2400
  }> | undefined;
1757
2401
  headers?: Record<string, string> | undefined;
2402
+ proxy?: string | undefined;
1758
2403
  }, {
1759
2404
  type: "streamable-http" | "http";
1760
2405
  url: string;
@@ -1781,6 +2426,8 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1781
2426
  response_types_supported?: string[] | undefined;
1782
2427
  code_challenge_methods_supported?: string[] | undefined;
1783
2428
  skip_code_challenge_check?: boolean | undefined;
2429
+ audience?: string | undefined;
2430
+ forward_audience_on_refresh?: boolean | undefined;
1784
2431
  revocation_endpoint?: string | undefined;
1785
2432
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1786
2433
  } | undefined;
@@ -1796,6 +2443,7 @@ export declare const MCPOptionsSchema: z.ZodUnion<[z.ZodObject<{
1796
2443
  description: string;
1797
2444
  }> | undefined;
1798
2445
  headers?: Record<string, string> | undefined;
2446
+ proxy?: string | undefined;
1799
2447
  }>]>;
1800
2448
  export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1801
2449
  /** Display name for the MCP server - only letters, numbers, and spaces allowed */
@@ -1831,16 +2479,16 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
1831
2479
  /**
1832
2480
  * OAuth configuration for SSE and Streamable HTTP transports
1833
2481
  * - Optional: OAuth can be auto-discovered on 401 responses
1834
- * - Pre-configured values will skip discovery steps
2482
+ * - Pre-configured confidential clients must pin both OAuth endpoints
1835
2483
  */
1836
- oauth: z.ZodOptional<z.ZodObject<{
2484
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1837
2485
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
1838
2486
  authorization_url: z.ZodOptional<z.ZodString>;
1839
2487
  /** OAuth token endpoint (optional - can be auto-discovered) */
1840
2488
  token_url: z.ZodOptional<z.ZodString>;
1841
2489
  /** OAuth client ID (optional - can use dynamic registration) */
1842
2490
  client_id: z.ZodOptional<z.ZodString>;
1843
- /** OAuth client secret (optional - can use dynamic registration) */
2491
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
1844
2492
  client_secret: z.ZodOptional<z.ZodString>;
1845
2493
  /** OAuth scopes to request */
1846
2494
  scope: z.ZodOptional<z.ZodString>;
@@ -1858,6 +2506,43 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
1858
2506
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1859
2507
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
1860
2508
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
2509
+ /**
2510
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
2511
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
2512
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
2513
+ * automatically from Protected Resource Metadata) is the standards-conformant
2514
+ * route; `audience` covers the providers that ignore it.
2515
+ *
2516
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
2517
+ * and DCR-discovered paths). Whether it is also forwarded on the
2518
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
2519
+ *
2520
+ * The `authorization_code` exchange intentionally never receives `audience` —
2521
+ * Auth0 binds audience from the original `/authorize` request and embeds it
2522
+ * in the issued access token; sending it again is redundant.
2523
+ *
2524
+ * No canonicalization is applied — the audience identifier is provider-defined
2525
+ * and may differ from the MCP server URL. This field is only accepted from
2526
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
2527
+ */
2528
+ audience: z.ZodOptional<z.ZodString>;
2529
+ /**
2530
+ * Whether to also forward `audience` on the `refresh_token` grant body.
2531
+ *
2532
+ * Default: `true`. Required for Auth0, which strips the API audience from
2533
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
2534
+ * — without it the next MCP call 401s once the initial access token expires.
2535
+ *
2536
+ * Set to `false` for providers that document refresh requests as
2537
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
2538
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
2539
+ * `aud` claim across refreshes when the initial token was resource-bound,
2540
+ * so the extra parameter is redundant and may be rejected as
2541
+ * `invalid_request`.
2542
+ *
2543
+ * Ignored when `audience` itself is not configured.
2544
+ */
2545
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
1861
2546
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
1862
2547
  revocation_endpoint: z.ZodOptional<z.ZodString>;
1863
2548
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -1875,6 +2560,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
1875
2560
  response_types_supported?: string[] | undefined;
1876
2561
  code_challenge_methods_supported?: string[] | undefined;
1877
2562
  skip_code_challenge_check?: boolean | undefined;
2563
+ audience?: string | undefined;
2564
+ forward_audience_on_refresh?: boolean | undefined;
1878
2565
  revocation_endpoint?: string | undefined;
1879
2566
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1880
2567
  }, {
@@ -1890,20 +2577,56 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
1890
2577
  response_types_supported?: string[] | undefined;
1891
2578
  code_challenge_methods_supported?: string[] | undefined;
1892
2579
  skip_code_challenge_check?: boolean | undefined;
2580
+ audience?: string | undefined;
2581
+ forward_audience_on_refresh?: boolean | undefined;
1893
2582
  revocation_endpoint?: string | undefined;
1894
2583
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1895
- }>>;
1896
- /** Custom headers to send with OAuth requests (registration, discovery, token exchange, etc.) */
1897
- oauth_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1898
- /**
1899
- * API Key authentication configuration for SSE and Streamable HTTP transports
1900
- * - source: 'admin' means the key is provided by admin and shared by all users
1901
- * - source: 'user' means each user provides their own key via customUserVars
1902
- */
1903
- apiKey: z.ZodOptional<z.ZodObject<{
1904
- /** API key value (only for admin-provided mode, stored encrypted) */
1905
- key: z.ZodOptional<z.ZodString>;
1906
- /** Whether key is provided by admin or each user */
2584
+ }>, {
2585
+ authorization_url?: string | undefined;
2586
+ token_url?: string | undefined;
2587
+ client_id?: string | undefined;
2588
+ client_secret?: string | undefined;
2589
+ scope?: string | undefined;
2590
+ redirect_uri?: string | undefined;
2591
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
2592
+ grant_types_supported?: string[] | undefined;
2593
+ token_endpoint_auth_methods_supported?: string[] | undefined;
2594
+ response_types_supported?: string[] | undefined;
2595
+ code_challenge_methods_supported?: string[] | undefined;
2596
+ skip_code_challenge_check?: boolean | undefined;
2597
+ audience?: string | undefined;
2598
+ forward_audience_on_refresh?: boolean | undefined;
2599
+ revocation_endpoint?: string | undefined;
2600
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
2601
+ }, {
2602
+ authorization_url?: string | undefined;
2603
+ token_url?: string | undefined;
2604
+ client_id?: string | undefined;
2605
+ client_secret?: string | undefined;
2606
+ scope?: string | undefined;
2607
+ redirect_uri?: string | undefined;
2608
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
2609
+ grant_types_supported?: string[] | undefined;
2610
+ token_endpoint_auth_methods_supported?: string[] | undefined;
2611
+ response_types_supported?: string[] | undefined;
2612
+ code_challenge_methods_supported?: string[] | undefined;
2613
+ skip_code_challenge_check?: boolean | undefined;
2614
+ audience?: string | undefined;
2615
+ forward_audience_on_refresh?: boolean | undefined;
2616
+ revocation_endpoint?: string | undefined;
2617
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
2618
+ }>>;
2619
+ /** Custom headers to send with OAuth requests (registration, discovery, token exchange, etc.) */
2620
+ oauth_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2621
+ /**
2622
+ * API Key authentication configuration for SSE and Streamable HTTP transports
2623
+ * - source: 'admin' means the key is provided by admin and shared by all users
2624
+ * - source: 'user' means each user provides their own key via customUserVars
2625
+ */
2626
+ apiKey: z.ZodOptional<z.ZodObject<{
2627
+ /** API key value (only for admin-provided mode, stored encrypted) */
2628
+ key: z.ZodOptional<z.ZodString>;
2629
+ /** Whether key is provided by admin or each user */
1907
2630
  source: z.ZodEnum<["admin", "user"]>;
1908
2631
  /** How to format the authorization header */
1909
2632
  authorization_type: z.ZodEnum<["basic", "bearer", "custom"]>;
@@ -1980,6 +2703,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
1980
2703
  response_types_supported?: string[] | undefined;
1981
2704
  code_challenge_methods_supported?: string[] | undefined;
1982
2705
  skip_code_challenge_check?: boolean | undefined;
2706
+ audience?: string | undefined;
2707
+ forward_audience_on_refresh?: boolean | undefined;
1983
2708
  revocation_endpoint?: string | undefined;
1984
2709
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
1985
2710
  } | undefined;
@@ -1999,6 +2724,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
1999
2724
  }, {
2000
2725
  command: string;
2001
2726
  args: string[];
2727
+ type?: "stdio" | undefined;
2002
2728
  title?: string | undefined;
2003
2729
  description?: string | undefined;
2004
2730
  startup?: boolean | undefined;
@@ -2007,7 +2733,6 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2007
2733
  sseReadTimeout?: number | undefined;
2008
2734
  initTimeout?: number | undefined;
2009
2735
  chatMenu?: boolean | undefined;
2010
- type?: "stdio" | undefined;
2011
2736
  serverInstructions?: string | boolean | undefined;
2012
2737
  requiresOAuth?: boolean | undefined;
2013
2738
  oauth?: {
@@ -2023,6 +2748,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2023
2748
  response_types_supported?: string[] | undefined;
2024
2749
  code_challenge_methods_supported?: string[] | undefined;
2025
2750
  skip_code_challenge_check?: boolean | undefined;
2751
+ audience?: string | undefined;
2752
+ forward_audience_on_refresh?: boolean | undefined;
2026
2753
  revocation_endpoint?: string | undefined;
2027
2754
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2028
2755
  } | undefined;
@@ -2073,16 +2800,16 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2073
2800
  /**
2074
2801
  * OAuth configuration for SSE and Streamable HTTP transports
2075
2802
  * - Optional: OAuth can be auto-discovered on 401 responses
2076
- * - Pre-configured values will skip discovery steps
2803
+ * - Pre-configured confidential clients must pin both OAuth endpoints
2077
2804
  */
2078
- oauth: z.ZodOptional<z.ZodObject<{
2805
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2079
2806
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
2080
2807
  authorization_url: z.ZodOptional<z.ZodString>;
2081
2808
  /** OAuth token endpoint (optional - can be auto-discovered) */
2082
2809
  token_url: z.ZodOptional<z.ZodString>;
2083
2810
  /** OAuth client ID (optional - can use dynamic registration) */
2084
2811
  client_id: z.ZodOptional<z.ZodString>;
2085
- /** OAuth client secret (optional - can use dynamic registration) */
2812
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
2086
2813
  client_secret: z.ZodOptional<z.ZodString>;
2087
2814
  /** OAuth scopes to request */
2088
2815
  scope: z.ZodOptional<z.ZodString>;
@@ -2100,6 +2827,43 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2100
2827
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2101
2828
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
2102
2829
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
2830
+ /**
2831
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
2832
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
2833
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
2834
+ * automatically from Protected Resource Metadata) is the standards-conformant
2835
+ * route; `audience` covers the providers that ignore it.
2836
+ *
2837
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
2838
+ * and DCR-discovered paths). Whether it is also forwarded on the
2839
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
2840
+ *
2841
+ * The `authorization_code` exchange intentionally never receives `audience` —
2842
+ * Auth0 binds audience from the original `/authorize` request and embeds it
2843
+ * in the issued access token; sending it again is redundant.
2844
+ *
2845
+ * No canonicalization is applied — the audience identifier is provider-defined
2846
+ * and may differ from the MCP server URL. This field is only accepted from
2847
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
2848
+ */
2849
+ audience: z.ZodOptional<z.ZodString>;
2850
+ /**
2851
+ * Whether to also forward `audience` on the `refresh_token` grant body.
2852
+ *
2853
+ * Default: `true`. Required for Auth0, which strips the API audience from
2854
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
2855
+ * — without it the next MCP call 401s once the initial access token expires.
2856
+ *
2857
+ * Set to `false` for providers that document refresh requests as
2858
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
2859
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
2860
+ * `aud` claim across refreshes when the initial token was resource-bound,
2861
+ * so the extra parameter is redundant and may be rejected as
2862
+ * `invalid_request`.
2863
+ *
2864
+ * Ignored when `audience` itself is not configured.
2865
+ */
2866
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
2103
2867
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
2104
2868
  revocation_endpoint: z.ZodOptional<z.ZodString>;
2105
2869
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -2117,6 +2881,42 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2117
2881
  response_types_supported?: string[] | undefined;
2118
2882
  code_challenge_methods_supported?: string[] | undefined;
2119
2883
  skip_code_challenge_check?: boolean | undefined;
2884
+ audience?: string | undefined;
2885
+ forward_audience_on_refresh?: boolean | undefined;
2886
+ revocation_endpoint?: string | undefined;
2887
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
2888
+ }, {
2889
+ authorization_url?: string | undefined;
2890
+ token_url?: string | undefined;
2891
+ client_id?: string | undefined;
2892
+ client_secret?: string | undefined;
2893
+ scope?: string | undefined;
2894
+ redirect_uri?: string | undefined;
2895
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
2896
+ grant_types_supported?: string[] | undefined;
2897
+ token_endpoint_auth_methods_supported?: string[] | undefined;
2898
+ response_types_supported?: string[] | undefined;
2899
+ code_challenge_methods_supported?: string[] | undefined;
2900
+ skip_code_challenge_check?: boolean | undefined;
2901
+ audience?: string | undefined;
2902
+ forward_audience_on_refresh?: boolean | undefined;
2903
+ revocation_endpoint?: string | undefined;
2904
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
2905
+ }>, {
2906
+ authorization_url?: string | undefined;
2907
+ token_url?: string | undefined;
2908
+ client_id?: string | undefined;
2909
+ client_secret?: string | undefined;
2910
+ scope?: string | undefined;
2911
+ redirect_uri?: string | undefined;
2912
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
2913
+ grant_types_supported?: string[] | undefined;
2914
+ token_endpoint_auth_methods_supported?: string[] | undefined;
2915
+ response_types_supported?: string[] | undefined;
2916
+ code_challenge_methods_supported?: string[] | undefined;
2917
+ skip_code_challenge_check?: boolean | undefined;
2918
+ audience?: string | undefined;
2919
+ forward_audience_on_refresh?: boolean | undefined;
2120
2920
  revocation_endpoint?: string | undefined;
2121
2921
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2122
2922
  }, {
@@ -2132,6 +2932,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2132
2932
  response_types_supported?: string[] | undefined;
2133
2933
  code_challenge_methods_supported?: string[] | undefined;
2134
2934
  skip_code_challenge_check?: boolean | undefined;
2935
+ audience?: string | undefined;
2936
+ forward_audience_on_refresh?: boolean | undefined;
2135
2937
  revocation_endpoint?: string | undefined;
2136
2938
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2137
2939
  }>>;
@@ -2201,6 +3003,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2201
3003
  response_types_supported?: string[] | undefined;
2202
3004
  code_challenge_methods_supported?: string[] | undefined;
2203
3005
  skip_code_challenge_check?: boolean | undefined;
3006
+ audience?: string | undefined;
3007
+ forward_audience_on_refresh?: boolean | undefined;
2204
3008
  revocation_endpoint?: string | undefined;
2205
3009
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2206
3010
  } | undefined;
@@ -2217,6 +3021,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2217
3021
  }> | undefined;
2218
3022
  }, {
2219
3023
  url: string;
3024
+ type?: "websocket" | undefined;
2220
3025
  title?: string | undefined;
2221
3026
  description?: string | undefined;
2222
3027
  startup?: boolean | undefined;
@@ -2225,7 +3030,6 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2225
3030
  sseReadTimeout?: number | undefined;
2226
3031
  initTimeout?: number | undefined;
2227
3032
  chatMenu?: boolean | undefined;
2228
- type?: "websocket" | undefined;
2229
3033
  serverInstructions?: string | boolean | undefined;
2230
3034
  requiresOAuth?: boolean | undefined;
2231
3035
  oauth?: {
@@ -2241,6 +3045,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2241
3045
  response_types_supported?: string[] | undefined;
2242
3046
  code_challenge_methods_supported?: string[] | undefined;
2243
3047
  skip_code_challenge_check?: boolean | undefined;
3048
+ audience?: string | undefined;
3049
+ forward_audience_on_refresh?: boolean | undefined;
2244
3050
  revocation_endpoint?: string | undefined;
2245
3051
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2246
3052
  } | undefined;
@@ -2289,16 +3095,16 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2289
3095
  /**
2290
3096
  * OAuth configuration for SSE and Streamable HTTP transports
2291
3097
  * - Optional: OAuth can be auto-discovered on 401 responses
2292
- * - Pre-configured values will skip discovery steps
3098
+ * - Pre-configured confidential clients must pin both OAuth endpoints
2293
3099
  */
2294
- oauth: z.ZodOptional<z.ZodObject<{
3100
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2295
3101
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
2296
3102
  authorization_url: z.ZodOptional<z.ZodString>;
2297
3103
  /** OAuth token endpoint (optional - can be auto-discovered) */
2298
3104
  token_url: z.ZodOptional<z.ZodString>;
2299
3105
  /** OAuth client ID (optional - can use dynamic registration) */
2300
3106
  client_id: z.ZodOptional<z.ZodString>;
2301
- /** OAuth client secret (optional - can use dynamic registration) */
3107
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
2302
3108
  client_secret: z.ZodOptional<z.ZodString>;
2303
3109
  /** OAuth scopes to request */
2304
3110
  scope: z.ZodOptional<z.ZodString>;
@@ -2316,6 +3122,43 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2316
3122
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2317
3123
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
2318
3124
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
3125
+ /**
3126
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
3127
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
3128
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
3129
+ * automatically from Protected Resource Metadata) is the standards-conformant
3130
+ * route; `audience` covers the providers that ignore it.
3131
+ *
3132
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
3133
+ * and DCR-discovered paths). Whether it is also forwarded on the
3134
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
3135
+ *
3136
+ * The `authorization_code` exchange intentionally never receives `audience` —
3137
+ * Auth0 binds audience from the original `/authorize` request and embeds it
3138
+ * in the issued access token; sending it again is redundant.
3139
+ *
3140
+ * No canonicalization is applied — the audience identifier is provider-defined
3141
+ * and may differ from the MCP server URL. This field is only accepted from
3142
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
3143
+ */
3144
+ audience: z.ZodOptional<z.ZodString>;
3145
+ /**
3146
+ * Whether to also forward `audience` on the `refresh_token` grant body.
3147
+ *
3148
+ * Default: `true`. Required for Auth0, which strips the API audience from
3149
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
3150
+ * — without it the next MCP call 401s once the initial access token expires.
3151
+ *
3152
+ * Set to `false` for providers that document refresh requests as
3153
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
3154
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
3155
+ * `aud` claim across refreshes when the initial token was resource-bound,
3156
+ * so the extra parameter is redundant and may be rejected as
3157
+ * `invalid_request`.
3158
+ *
3159
+ * Ignored when `audience` itself is not configured.
3160
+ */
3161
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
2319
3162
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
2320
3163
  revocation_endpoint: z.ZodOptional<z.ZodString>;
2321
3164
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -2333,6 +3176,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2333
3176
  response_types_supported?: string[] | undefined;
2334
3177
  code_challenge_methods_supported?: string[] | undefined;
2335
3178
  skip_code_challenge_check?: boolean | undefined;
3179
+ audience?: string | undefined;
3180
+ forward_audience_on_refresh?: boolean | undefined;
2336
3181
  revocation_endpoint?: string | undefined;
2337
3182
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2338
3183
  }, {
@@ -2348,6 +3193,42 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2348
3193
  response_types_supported?: string[] | undefined;
2349
3194
  code_challenge_methods_supported?: string[] | undefined;
2350
3195
  skip_code_challenge_check?: boolean | undefined;
3196
+ audience?: string | undefined;
3197
+ forward_audience_on_refresh?: boolean | undefined;
3198
+ revocation_endpoint?: string | undefined;
3199
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3200
+ }>, {
3201
+ authorization_url?: string | undefined;
3202
+ token_url?: string | undefined;
3203
+ client_id?: string | undefined;
3204
+ client_secret?: string | undefined;
3205
+ scope?: string | undefined;
3206
+ redirect_uri?: string | undefined;
3207
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3208
+ grant_types_supported?: string[] | undefined;
3209
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3210
+ response_types_supported?: string[] | undefined;
3211
+ code_challenge_methods_supported?: string[] | undefined;
3212
+ skip_code_challenge_check?: boolean | undefined;
3213
+ audience?: string | undefined;
3214
+ forward_audience_on_refresh?: boolean | undefined;
3215
+ revocation_endpoint?: string | undefined;
3216
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3217
+ }, {
3218
+ authorization_url?: string | undefined;
3219
+ token_url?: string | undefined;
3220
+ client_id?: string | undefined;
3221
+ client_secret?: string | undefined;
3222
+ scope?: string | undefined;
3223
+ redirect_uri?: string | undefined;
3224
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3225
+ grant_types_supported?: string[] | undefined;
3226
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3227
+ response_types_supported?: string[] | undefined;
3228
+ code_challenge_methods_supported?: string[] | undefined;
3229
+ skip_code_challenge_check?: boolean | undefined;
3230
+ audience?: string | undefined;
3231
+ forward_audience_on_refresh?: boolean | undefined;
2351
3232
  revocation_endpoint?: string | undefined;
2352
3233
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2353
3234
  }>>;
@@ -2391,6 +3272,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2391
3272
  } & {
2392
3273
  type: z.ZodDefault<z.ZodLiteral<"sse">>;
2393
3274
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3275
+ /** Optional outbound proxy URL for this remote MCP transport */
3276
+ proxy: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
2394
3277
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
2395
3278
  }, "strip", z.ZodTypeAny, {
2396
3279
  type: "sse";
@@ -2418,6 +3301,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2418
3301
  response_types_supported?: string[] | undefined;
2419
3302
  code_challenge_methods_supported?: string[] | undefined;
2420
3303
  skip_code_challenge_check?: boolean | undefined;
3304
+ audience?: string | undefined;
3305
+ forward_audience_on_refresh?: boolean | undefined;
2421
3306
  revocation_endpoint?: string | undefined;
2422
3307
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2423
3308
  } | undefined;
@@ -2433,8 +3318,10 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2433
3318
  description: string;
2434
3319
  }> | undefined;
2435
3320
  headers?: Record<string, string> | undefined;
3321
+ proxy?: string | undefined;
2436
3322
  }, {
2437
3323
  url: string;
3324
+ type?: "sse" | undefined;
2438
3325
  title?: string | undefined;
2439
3326
  description?: string | undefined;
2440
3327
  startup?: boolean | undefined;
@@ -2443,7 +3330,6 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2443
3330
  sseReadTimeout?: number | undefined;
2444
3331
  initTimeout?: number | undefined;
2445
3332
  chatMenu?: boolean | undefined;
2446
- type?: "sse" | undefined;
2447
3333
  serverInstructions?: string | boolean | undefined;
2448
3334
  requiresOAuth?: boolean | undefined;
2449
3335
  oauth?: {
@@ -2459,6 +3345,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2459
3345
  response_types_supported?: string[] | undefined;
2460
3346
  code_challenge_methods_supported?: string[] | undefined;
2461
3347
  skip_code_challenge_check?: boolean | undefined;
3348
+ audience?: string | undefined;
3349
+ forward_audience_on_refresh?: boolean | undefined;
2462
3350
  revocation_endpoint?: string | undefined;
2463
3351
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2464
3352
  } | undefined;
@@ -2474,6 +3362,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2474
3362
  description: string;
2475
3363
  }> | undefined;
2476
3364
  headers?: Record<string, string> | undefined;
3365
+ proxy?: string | undefined;
2477
3366
  }>, z.ZodObject<{
2478
3367
  /** Display name for the MCP server - only letters, numbers, and spaces allowed */
2479
3368
  title: z.ZodOptional<z.ZodString>;
@@ -2508,16 +3397,16 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2508
3397
  /**
2509
3398
  * OAuth configuration for SSE and Streamable HTTP transports
2510
3399
  * - Optional: OAuth can be auto-discovered on 401 responses
2511
- * - Pre-configured values will skip discovery steps
3400
+ * - Pre-configured confidential clients must pin both OAuth endpoints
2512
3401
  */
2513
- oauth: z.ZodOptional<z.ZodObject<{
3402
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2514
3403
  /** OAuth authorization endpoint (optional - can be auto-discovered) */
2515
3404
  authorization_url: z.ZodOptional<z.ZodString>;
2516
3405
  /** OAuth token endpoint (optional - can be auto-discovered) */
2517
3406
  token_url: z.ZodOptional<z.ZodString>;
2518
3407
  /** OAuth client ID (optional - can use dynamic registration) */
2519
3408
  client_id: z.ZodOptional<z.ZodString>;
2520
- /** OAuth client secret (optional - can use dynamic registration) */
3409
+ /** OAuth client secret (requires explicit authorization and token endpoints) */
2521
3410
  client_secret: z.ZodOptional<z.ZodString>;
2522
3411
  /** OAuth scopes to request */
2523
3412
  scope: z.ZodOptional<z.ZodString>;
@@ -2535,6 +3424,43 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2535
3424
  code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2536
3425
  /** Skip code challenge validation and force S256 (useful for providers like AWS Cognito that support S256 but don't advertise it) */
2537
3426
  skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
3427
+ /**
3428
+ * Auth0/Cognito-style `audience` parameter. Authorization servers that pre-date
3429
+ * RFC 8707 — most prominently Auth0 — issue API-scoped access tokens only when
3430
+ * the `/authorize` request advertises an `audience`. RFC 8707 `resource` (set
3431
+ * automatically from Protected Resource Metadata) is the standards-conformant
3432
+ * route; `audience` covers the providers that ignore it.
3433
+ *
3434
+ * When set, the value is forwarded as-is on `/authorize` (both pre-configured
3435
+ * and DCR-discovered paths). Whether it is also forwarded on the
3436
+ * `refresh_token` grant is controlled by `forward_audience_on_refresh` below.
3437
+ *
3438
+ * The `authorization_code` exchange intentionally never receives `audience` —
3439
+ * Auth0 binds audience from the original `/authorize` request and embeds it
3440
+ * in the issued access token; sending it again is redundant.
3441
+ *
3442
+ * No canonicalization is applied — the audience identifier is provider-defined
3443
+ * and may differ from the MCP server URL. This field is only accepted from
3444
+ * trusted/admin MCP configuration and is rejected from user-managed servers.
3445
+ */
3446
+ audience: z.ZodOptional<z.ZodString>;
3447
+ /**
3448
+ * Whether to also forward `audience` on the `refresh_token` grant body.
3449
+ *
3450
+ * Default: `true`. Required for Auth0, which strips the API audience from
3451
+ * refreshed access tokens unless `audience` is re-supplied on every refresh
3452
+ * — without it the next MCP call 401s once the initial access token expires.
3453
+ *
3454
+ * Set to `false` for providers that document refresh requests as
3455
+ * `grant_type` + `client_id` + `refresh_token` only (Cognito and other
3456
+ * strict OAuth 2.0 token endpoints). Those providers maintain the original
3457
+ * `aud` claim across refreshes when the initial token was resource-bound,
3458
+ * so the extra parameter is redundant and may be rejected as
3459
+ * `invalid_request`.
3460
+ *
3461
+ * Ignored when `audience` itself is not configured.
3462
+ */
3463
+ forward_audience_on_refresh: z.ZodOptional<z.ZodBoolean>;
2538
3464
  /** OAuth revocation endpoint (optional - can be auto-discovered) */
2539
3465
  revocation_endpoint: z.ZodOptional<z.ZodString>;
2540
3466
  /** OAuth revocation endpoint authentication methods supported (optional - can be auto-discovered) */
@@ -2552,6 +3478,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2552
3478
  response_types_supported?: string[] | undefined;
2553
3479
  code_challenge_methods_supported?: string[] | undefined;
2554
3480
  skip_code_challenge_check?: boolean | undefined;
3481
+ audience?: string | undefined;
3482
+ forward_audience_on_refresh?: boolean | undefined;
2555
3483
  revocation_endpoint?: string | undefined;
2556
3484
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2557
3485
  }, {
@@ -2567,6 +3495,42 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2567
3495
  response_types_supported?: string[] | undefined;
2568
3496
  code_challenge_methods_supported?: string[] | undefined;
2569
3497
  skip_code_challenge_check?: boolean | undefined;
3498
+ audience?: string | undefined;
3499
+ forward_audience_on_refresh?: boolean | undefined;
3500
+ revocation_endpoint?: string | undefined;
3501
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3502
+ }>, {
3503
+ authorization_url?: string | undefined;
3504
+ token_url?: string | undefined;
3505
+ client_id?: string | undefined;
3506
+ client_secret?: string | undefined;
3507
+ scope?: string | undefined;
3508
+ redirect_uri?: string | undefined;
3509
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3510
+ grant_types_supported?: string[] | undefined;
3511
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3512
+ response_types_supported?: string[] | undefined;
3513
+ code_challenge_methods_supported?: string[] | undefined;
3514
+ skip_code_challenge_check?: boolean | undefined;
3515
+ audience?: string | undefined;
3516
+ forward_audience_on_refresh?: boolean | undefined;
3517
+ revocation_endpoint?: string | undefined;
3518
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3519
+ }, {
3520
+ authorization_url?: string | undefined;
3521
+ token_url?: string | undefined;
3522
+ client_id?: string | undefined;
3523
+ client_secret?: string | undefined;
3524
+ scope?: string | undefined;
3525
+ redirect_uri?: string | undefined;
3526
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3527
+ grant_types_supported?: string[] | undefined;
3528
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3529
+ response_types_supported?: string[] | undefined;
3530
+ code_challenge_methods_supported?: string[] | undefined;
3531
+ skip_code_challenge_check?: boolean | undefined;
3532
+ audience?: string | undefined;
3533
+ forward_audience_on_refresh?: boolean | undefined;
2570
3534
  revocation_endpoint?: string | undefined;
2571
3535
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2572
3536
  }>>;
@@ -2610,6 +3574,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2610
3574
  } & {
2611
3575
  type: z.ZodUnion<[z.ZodLiteral<"streamable-http">, z.ZodLiteral<"http">]>;
2612
3576
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3577
+ /** Optional outbound proxy URL for this remote MCP transport */
3578
+ proxy: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>>;
2613
3579
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
2614
3580
  }, "strip", z.ZodTypeAny, {
2615
3581
  type: "streamable-http" | "http";
@@ -2637,6 +3603,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2637
3603
  response_types_supported?: string[] | undefined;
2638
3604
  code_challenge_methods_supported?: string[] | undefined;
2639
3605
  skip_code_challenge_check?: boolean | undefined;
3606
+ audience?: string | undefined;
3607
+ forward_audience_on_refresh?: boolean | undefined;
2640
3608
  revocation_endpoint?: string | undefined;
2641
3609
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2642
3610
  } | undefined;
@@ -2652,6 +3620,7 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2652
3620
  description: string;
2653
3621
  }> | undefined;
2654
3622
  headers?: Record<string, string> | undefined;
3623
+ proxy?: string | undefined;
2655
3624
  }, {
2656
3625
  type: "streamable-http" | "http";
2657
3626
  url: string;
@@ -2678,6 +3647,8 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2678
3647
  response_types_supported?: string[] | undefined;
2679
3648
  code_challenge_methods_supported?: string[] | undefined;
2680
3649
  skip_code_challenge_check?: boolean | undefined;
3650
+ audience?: string | undefined;
3651
+ forward_audience_on_refresh?: boolean | undefined;
2681
3652
  revocation_endpoint?: string | undefined;
2682
3653
  revocation_endpoint_auth_methods_supported?: string[] | undefined;
2683
3654
  } | undefined;
@@ -2693,12 +3664,14 @@ export declare const MCPServersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
2693
3664
  description: string;
2694
3665
  }> | undefined;
2695
3666
  headers?: Record<string, string> | undefined;
3667
+ proxy?: string | undefined;
2696
3668
  }>]>>;
2697
3669
  export type MCPOptions = z.infer<typeof MCPOptionsSchema>;
2698
3670
  /**
2699
3671
  * MCP Server configuration that comes from UI/API input only.
2700
3672
  * Omits server-managed fields like startup, timeout, customUserVars, etc.
2701
- * Allows: title, description, url, iconPath, oauth (user credentials)
3673
+ * Allows: title, description, url, iconPath, oauth (user credentials).
3674
+ * Admin-only OAuth audience fields are rejected for user-managed servers.
2702
3675
  *
2703
3676
  * SECURITY: Stdio transport is intentionally excluded from user input.
2704
3677
  * Stdio allows arbitrary command execution and should only be configured
@@ -2714,41 +3687,314 @@ export type MCPOptions = z.infer<typeof MCPOptionsSchema>;
2714
3687
  export declare const MCPServerUserInputSchema: z.ZodUnion<[z.ZodObject<{
2715
3688
  [x: string]: z.ZodTypeAny;
2716
3689
  [x: number]: z.ZodTypeAny;
3690
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
3691
+ client_id: z.ZodOptional<z.ZodString>;
3692
+ client_secret: z.ZodOptional<z.ZodString>;
3693
+ scope: z.ZodOptional<z.ZodString>;
3694
+ redirect_uri: z.ZodOptional<z.ZodString>;
3695
+ token_exchange_method: z.ZodOptional<z.ZodNativeEnum<typeof TokenExchangeMethodEnum>>;
3696
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3697
+ token_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3698
+ response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3699
+ code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3700
+ skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
3701
+ revocation_endpoint: z.ZodOptional<z.ZodString>;
3702
+ revocation_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3703
+ } & {
3704
+ authorization_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3705
+ token_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3706
+ audience: z.ZodOptional<z.ZodNever>;
3707
+ forward_audience_on_refresh: z.ZodOptional<z.ZodNever>;
3708
+ }, "strip", z.ZodTypeAny, {
3709
+ authorization_url?: string | undefined;
3710
+ token_url?: string | undefined;
3711
+ client_id?: string | undefined;
3712
+ client_secret?: string | undefined;
3713
+ scope?: string | undefined;
3714
+ redirect_uri?: string | undefined;
3715
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3716
+ grant_types_supported?: string[] | undefined;
3717
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3718
+ response_types_supported?: string[] | undefined;
3719
+ code_challenge_methods_supported?: string[] | undefined;
3720
+ skip_code_challenge_check?: boolean | undefined;
3721
+ audience?: undefined;
3722
+ forward_audience_on_refresh?: undefined;
3723
+ revocation_endpoint?: string | undefined;
3724
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3725
+ }, {
3726
+ authorization_url?: string | undefined;
3727
+ token_url?: string | undefined;
3728
+ client_id?: string | undefined;
3729
+ client_secret?: string | undefined;
3730
+ scope?: string | undefined;
3731
+ redirect_uri?: string | undefined;
3732
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3733
+ grant_types_supported?: string[] | undefined;
3734
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3735
+ response_types_supported?: string[] | undefined;
3736
+ code_challenge_methods_supported?: string[] | undefined;
3737
+ skip_code_challenge_check?: boolean | undefined;
3738
+ audience?: undefined;
3739
+ forward_audience_on_refresh?: undefined;
3740
+ revocation_endpoint?: string | undefined;
3741
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3742
+ }>, {
3743
+ authorization_url?: string | undefined;
3744
+ token_url?: string | undefined;
3745
+ client_id?: string | undefined;
3746
+ client_secret?: string | undefined;
3747
+ scope?: string | undefined;
3748
+ redirect_uri?: string | undefined;
3749
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3750
+ grant_types_supported?: string[] | undefined;
3751
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3752
+ response_types_supported?: string[] | undefined;
3753
+ code_challenge_methods_supported?: string[] | undefined;
3754
+ skip_code_challenge_check?: boolean | undefined;
3755
+ audience?: undefined;
3756
+ forward_audience_on_refresh?: undefined;
3757
+ revocation_endpoint?: string | undefined;
3758
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3759
+ }, {
3760
+ authorization_url?: string | undefined;
3761
+ token_url?: string | undefined;
3762
+ client_id?: string | undefined;
3763
+ client_secret?: string | undefined;
3764
+ scope?: string | undefined;
3765
+ redirect_uri?: string | undefined;
3766
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3767
+ grant_types_supported?: string[] | undefined;
3768
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3769
+ response_types_supported?: string[] | undefined;
3770
+ code_challenge_methods_supported?: string[] | undefined;
3771
+ skip_code_challenge_check?: boolean | undefined;
3772
+ audience?: undefined;
3773
+ forward_audience_on_refresh?: undefined;
3774
+ revocation_endpoint?: string | undefined;
3775
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3776
+ }>>;
2717
3777
  } & {
2718
3778
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
2719
3779
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2720
3780
  [x: string]: any;
2721
3781
  [x: number]: any;
3782
+ oauth?: unknown;
2722
3783
  url?: unknown;
2723
3784
  }, {
2724
3785
  [x: string]: any;
2725
3786
  [x: number]: any;
3787
+ oauth?: unknown;
2726
3788
  url?: unknown;
2727
3789
  }>, z.ZodObject<{
2728
3790
  [x: string]: z.ZodTypeAny;
2729
3791
  [x: number]: z.ZodTypeAny;
3792
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
3793
+ client_id: z.ZodOptional<z.ZodString>;
3794
+ client_secret: z.ZodOptional<z.ZodString>;
3795
+ scope: z.ZodOptional<z.ZodString>;
3796
+ redirect_uri: z.ZodOptional<z.ZodString>;
3797
+ token_exchange_method: z.ZodOptional<z.ZodNativeEnum<typeof TokenExchangeMethodEnum>>;
3798
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3799
+ token_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3800
+ response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3801
+ code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3802
+ skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
3803
+ revocation_endpoint: z.ZodOptional<z.ZodString>;
3804
+ revocation_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3805
+ } & {
3806
+ authorization_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3807
+ token_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3808
+ audience: z.ZodOptional<z.ZodNever>;
3809
+ forward_audience_on_refresh: z.ZodOptional<z.ZodNever>;
3810
+ }, "strip", z.ZodTypeAny, {
3811
+ authorization_url?: string | undefined;
3812
+ token_url?: string | undefined;
3813
+ client_id?: string | undefined;
3814
+ client_secret?: string | undefined;
3815
+ scope?: string | undefined;
3816
+ redirect_uri?: string | undefined;
3817
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3818
+ grant_types_supported?: string[] | undefined;
3819
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3820
+ response_types_supported?: string[] | undefined;
3821
+ code_challenge_methods_supported?: string[] | undefined;
3822
+ skip_code_challenge_check?: boolean | undefined;
3823
+ audience?: undefined;
3824
+ forward_audience_on_refresh?: undefined;
3825
+ revocation_endpoint?: string | undefined;
3826
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3827
+ }, {
3828
+ authorization_url?: string | undefined;
3829
+ token_url?: string | undefined;
3830
+ client_id?: string | undefined;
3831
+ client_secret?: string | undefined;
3832
+ scope?: string | undefined;
3833
+ redirect_uri?: string | undefined;
3834
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3835
+ grant_types_supported?: string[] | undefined;
3836
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3837
+ response_types_supported?: string[] | undefined;
3838
+ code_challenge_methods_supported?: string[] | undefined;
3839
+ skip_code_challenge_check?: boolean | undefined;
3840
+ audience?: undefined;
3841
+ forward_audience_on_refresh?: undefined;
3842
+ revocation_endpoint?: string | undefined;
3843
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3844
+ }>, {
3845
+ authorization_url?: string | undefined;
3846
+ token_url?: string | undefined;
3847
+ client_id?: string | undefined;
3848
+ client_secret?: string | undefined;
3849
+ scope?: string | undefined;
3850
+ redirect_uri?: string | undefined;
3851
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3852
+ grant_types_supported?: string[] | undefined;
3853
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3854
+ response_types_supported?: string[] | undefined;
3855
+ code_challenge_methods_supported?: string[] | undefined;
3856
+ skip_code_challenge_check?: boolean | undefined;
3857
+ audience?: undefined;
3858
+ forward_audience_on_refresh?: undefined;
3859
+ revocation_endpoint?: string | undefined;
3860
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3861
+ }, {
3862
+ authorization_url?: string | undefined;
3863
+ token_url?: string | undefined;
3864
+ client_id?: string | undefined;
3865
+ client_secret?: string | undefined;
3866
+ scope?: string | undefined;
3867
+ redirect_uri?: string | undefined;
3868
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3869
+ grant_types_supported?: string[] | undefined;
3870
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3871
+ response_types_supported?: string[] | undefined;
3872
+ code_challenge_methods_supported?: string[] | undefined;
3873
+ skip_code_challenge_check?: boolean | undefined;
3874
+ audience?: undefined;
3875
+ forward_audience_on_refresh?: undefined;
3876
+ revocation_endpoint?: string | undefined;
3877
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3878
+ }>>;
2730
3879
  } & {
3880
+ proxy: z.ZodOptional<z.ZodNever>;
2731
3881
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
2732
3882
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2733
3883
  [x: string]: any;
2734
3884
  [x: number]: any;
3885
+ oauth?: unknown;
3886
+ proxy?: unknown;
2735
3887
  url?: unknown;
2736
3888
  }, {
2737
3889
  [x: string]: any;
2738
3890
  [x: number]: any;
3891
+ oauth?: unknown;
3892
+ proxy?: unknown;
2739
3893
  url?: unknown;
2740
3894
  }>, z.ZodObject<{
2741
3895
  [x: string]: z.ZodTypeAny;
2742
3896
  [x: number]: z.ZodTypeAny;
3897
+ oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
3898
+ client_id: z.ZodOptional<z.ZodString>;
3899
+ client_secret: z.ZodOptional<z.ZodString>;
3900
+ scope: z.ZodOptional<z.ZodString>;
3901
+ redirect_uri: z.ZodOptional<z.ZodString>;
3902
+ token_exchange_method: z.ZodOptional<z.ZodNativeEnum<typeof TokenExchangeMethodEnum>>;
3903
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3904
+ token_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3905
+ response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3906
+ code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3907
+ skip_code_challenge_check: z.ZodOptional<z.ZodBoolean>;
3908
+ revocation_endpoint: z.ZodOptional<z.ZodString>;
3909
+ revocation_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3910
+ } & {
3911
+ authorization_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3912
+ token_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3913
+ audience: z.ZodOptional<z.ZodNever>;
3914
+ forward_audience_on_refresh: z.ZodOptional<z.ZodNever>;
3915
+ }, "strip", z.ZodTypeAny, {
3916
+ authorization_url?: string | undefined;
3917
+ token_url?: string | undefined;
3918
+ client_id?: string | undefined;
3919
+ client_secret?: string | undefined;
3920
+ scope?: string | undefined;
3921
+ redirect_uri?: string | undefined;
3922
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3923
+ grant_types_supported?: string[] | undefined;
3924
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3925
+ response_types_supported?: string[] | undefined;
3926
+ code_challenge_methods_supported?: string[] | undefined;
3927
+ skip_code_challenge_check?: boolean | undefined;
3928
+ audience?: undefined;
3929
+ forward_audience_on_refresh?: undefined;
3930
+ revocation_endpoint?: string | undefined;
3931
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3932
+ }, {
3933
+ authorization_url?: string | undefined;
3934
+ token_url?: string | undefined;
3935
+ client_id?: string | undefined;
3936
+ client_secret?: string | undefined;
3937
+ scope?: string | undefined;
3938
+ redirect_uri?: string | undefined;
3939
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3940
+ grant_types_supported?: string[] | undefined;
3941
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3942
+ response_types_supported?: string[] | undefined;
3943
+ code_challenge_methods_supported?: string[] | undefined;
3944
+ skip_code_challenge_check?: boolean | undefined;
3945
+ audience?: undefined;
3946
+ forward_audience_on_refresh?: undefined;
3947
+ revocation_endpoint?: string | undefined;
3948
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3949
+ }>, {
3950
+ authorization_url?: string | undefined;
3951
+ token_url?: string | undefined;
3952
+ client_id?: string | undefined;
3953
+ client_secret?: string | undefined;
3954
+ scope?: string | undefined;
3955
+ redirect_uri?: string | undefined;
3956
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3957
+ grant_types_supported?: string[] | undefined;
3958
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3959
+ response_types_supported?: string[] | undefined;
3960
+ code_challenge_methods_supported?: string[] | undefined;
3961
+ skip_code_challenge_check?: boolean | undefined;
3962
+ audience?: undefined;
3963
+ forward_audience_on_refresh?: undefined;
3964
+ revocation_endpoint?: string | undefined;
3965
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3966
+ }, {
3967
+ authorization_url?: string | undefined;
3968
+ token_url?: string | undefined;
3969
+ client_id?: string | undefined;
3970
+ client_secret?: string | undefined;
3971
+ scope?: string | undefined;
3972
+ redirect_uri?: string | undefined;
3973
+ token_exchange_method?: TokenExchangeMethodEnum | undefined;
3974
+ grant_types_supported?: string[] | undefined;
3975
+ token_endpoint_auth_methods_supported?: string[] | undefined;
3976
+ response_types_supported?: string[] | undefined;
3977
+ code_challenge_methods_supported?: string[] | undefined;
3978
+ skip_code_challenge_check?: boolean | undefined;
3979
+ audience?: undefined;
3980
+ forward_audience_on_refresh?: undefined;
3981
+ revocation_endpoint?: string | undefined;
3982
+ revocation_endpoint_auth_methods_supported?: string[] | undefined;
3983
+ }>>;
2743
3984
  } & {
3985
+ proxy: z.ZodOptional<z.ZodNever>;
2744
3986
  url: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>, string, string>;
2745
3987
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2746
3988
  [x: string]: any;
2747
3989
  [x: number]: any;
3990
+ oauth?: unknown;
3991
+ proxy?: unknown;
2748
3992
  url?: unknown;
2749
3993
  }, {
2750
3994
  [x: string]: any;
2751
3995
  [x: number]: any;
3996
+ oauth?: unknown;
3997
+ proxy?: unknown;
2752
3998
  url?: unknown;
2753
3999
  }>]>;
2754
4000
  export type MCPServerUserInput = z.infer<typeof MCPServerUserInputSchema>;