@@ -35,6 +35,7 @@ async function runProxy(
3535 host : string ,
3636 staticOAuthClientMetadata : StaticOAuthClientMetadata ,
3737 staticOAuthClientInfo : StaticOAuthClientInformationFull ,
38+ authorizeResource : string ,
3839) {
3940 // Set up event emitter for auth flow
4041 const events = new EventEmitter ( )
@@ -53,6 +54,7 @@ async function runProxy(
5354 clientName : 'MCP CLI Proxy' ,
5455 staticOAuthClientMetadata,
5556 staticOAuthClientInfo,
57+ authorizeResource,
5658 } )
5759
5860 // Create the STDIO transport for local connections
@@ -142,9 +144,30 @@ to the CA certificate file. If using claude_desktop_config.json, this might look
142144
143145// Parse command-line arguments and run the proxy
144146parseCommandLineArgs ( process . argv . slice ( 2 ) , 'Usage: npx tsx proxy.ts <https://server-url> [callback-port] [--debug]' )
145- . then ( ( { serverUrl, callbackPort, headers, transportStrategy, host, debug, staticOAuthClientMetadata, staticOAuthClientInfo } ) => {
146- return runProxy ( serverUrl , callbackPort , headers , transportStrategy , host , staticOAuthClientMetadata , staticOAuthClientInfo )
147- } )
147+ . then (
148+ ( {
149+ serverUrl,
150+ callbackPort,
151+ headers,
152+ transportStrategy,
153+ host,
154+ debug,
155+ staticOAuthClientMetadata,
156+ staticOAuthClientInfo,
157+ authorizeResource,
158+ } ) => {
159+ return runProxy (
160+ serverUrl ,
161+ callbackPort ,
162+ headers ,
163+ transportStrategy ,
164+ host ,
165+ staticOAuthClientMetadata ,
166+ staticOAuthClientInfo ,
167+ authorizeResource ,
168+ )
169+ } ,
170+ )
148171 . catch ( ( error ) => {
149172 log ( 'Fatal error:' , error )
150173 process . exit ( 1 )
0 commit comments