File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ def create_api_gateway(
112112
113113 # Import Cognito User Pool from the McpAuth stack
114114 user_pool_id = Fn .import_value ("McpAuth-UserPoolId" )
115- authorization_url = Fn .import_value ("McpAuth-AuthorizationServerUrl" )
115+ user_pool_provider_url = Fn .import_value ("McpAuth-IssuerDomain" )
116+
116117 user_pool = cognito .UserPool .from_user_pool_id (
117118 self , "ImportedUserPool" , user_pool_id
118119 )
@@ -200,7 +201,7 @@ def create_api_gateway(
200201 {
201202 "resource_name" : "Dad Jokes MCP Server" ,
202203 "resource" : f"https://{ api .rest_api_id } .execute-api.{ self .region } .amazonaws.com/prod/mcp" ,
203- "authorization_servers" : [authorization_url ],
204+ "authorization_servers" : [user_pool_provider_url ],
204205 "scopes_supported" : ["mcp-resource-server/dad-jokes" ],
205206 "bearer_methods_supported" : ["header" ],
206207 },
Original file line number Diff line number Diff line change @@ -103,9 +103,7 @@ export class DogFactsMcpServer extends cdk.Stack {
103103
104104 // Authorize with Cognito
105105 const userPoolId = cdk . Fn . importValue ( "McpAuth-UserPoolId" ) ;
106- const authorizationUrl = cdk . Fn . importValue (
107- "McpAuth-AuthorizationServerUrl"
108- ) ;
106+ const userPoolProviderUrl = cdk . Fn . importValue ( "McpAuth-IssuerDomain" ) ;
109107 const userPool = UserPool . fromUserPoolId (
110108 this ,
111109 "ImportedUserPool" ,
@@ -187,7 +185,7 @@ export class DogFactsMcpServer extends cdk.Stack {
187185 {
188186 resource_name : "Dog Facts MCP Server" ,
189187 resource : `https://${ api . restApiId } .execute-api.${ this . region } .amazonaws.com/prod/mcp` ,
190- authorization_servers : [ authorizationUrl ] ,
188+ authorization_servers : [ userPoolProviderUrl ] ,
191189 scopes_supported : [ "mcp-resource-server/dog-facts" ] ,
192190 bearer_methods_supported : [ "header" ] ,
193191 } ,
You can’t perform that action at this time.
0 commit comments