Skip to main content
Glama
hteek

Serverless MCP

by hteek
clientsFunction.ts1.17 kB
import { Stack } from 'aws-cdk-lib'; import { IUserPool } from 'aws-cdk-lib/aws-cognito'; import { ITable } from 'aws-cdk-lib/aws-dynamodb'; import { Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam'; import { Construct } from 'constructs'; import { BaseNodejsFunction } from '../lambda.js'; export interface ClientsFunctionProps { table: ITable; userPool: IUserPool; } export class ClientsFunction extends BaseNodejsFunction { constructor(scope: Construct, props: ClientsFunctionProps) { const { table, userPool } = props; super(scope, 'Clients', { dynamodb: { table, grantWriteData: true, }, nodejsFunctionProps: { environment: { USER_POOL_ID: userPool.userPoolId, }, }, }); const { account, region } = Stack.of(this); this.assumedRole.addToPolicy( new PolicyStatement({ actions: [ 'cognito-idp:CreateUserPoolClient', 'cognito-idp:DescribeUserPoolClient', ], resources: [ `arn:aws:cognito-idp:${region}:${account}:userpool/${userPool.userPoolId}`, ], effect: Effect.ALLOW, }) ); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hteek/serverless-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server