Route workspace-mcp through API Gateway to bypass SCP Lambda URL block

This commit is contained in:
daniel
2026-05-08 10:24:37 -05:00
parent eaf19fa9c5
commit 647cb516db
2 changed files with 11 additions and 2 deletions

View File

@@ -276,6 +276,15 @@ export class AgentClawStack extends cdk.Stack {
),
});
// workspace-mcp proxy route — no auth (SCP blocks Lambda Function URLs)
httpApi.addRoutes({
path: '/workspace/{proxy+}',
methods: [apigatewayv2.HttpMethod.ANY],
integration: new apigatewayv2integrations.HttpLambdaIntegration(
'WorkspaceMcpIntegration', workspaceMcpFn
),
});
// Set OAUTH_REDIRECT_URI now that we have the API URL
const oauthRedirectUri = `${httpApi.url}oauth/callback`;
oauthHandlerFn.addEnvironment('OAUTH_REDIRECT_URI', oauthRedirectUri);