Skip to main content
Glama

FastMCP Boilerplate

by rainer85ah
main.tf1.67 kB
resource "aws_ecs_cluster" "main" { name = "${var.environment}-ecs-cluster" tags = { Environment = var.environment } } resource "aws_security_group" "ecs" { name = "${var.environment}-ecs-sg" description = "Allow HTTP" vpc_id = var.vpc_id ingress { from_port = 80 to_port = 80 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } tags = { Name = "${var.environment}-ecs-sg" Environment = var.environment } } resource "aws_ecs_task_definition" "main" { family = "${var.environment}-mcp-task" requires_compatibilities = ["FARGATE"] network_mode = "awsvpc" cpu = "512" memory = "1024" execution_role_arn = var.ecs_execution_role_arn container_definitions = jsonencode([ { name = "mcp-server" image = "ghcr.io/${var.ghcr_user}/mcp-server:${var.image_tag}" essential = true portMappings = [ { containerPort = 80 hostPort = 80 protocol = "tcp" } ] } ]) } resource "aws_ecs_service" "main" { name = "${var.environment}-mcp-service" cluster = aws_ecs_cluster.main.id task_definition = aws_ecs_task_definition.main.arn desired_count = 1 launch_type = "FARGATE" network_configuration { subnets = var.public_subnet_ids assign_public_ip = true security_groups = [aws_security_group.ecs.id] } depends_on = [aws_ecs_task_definition.main] }

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/rainer85ah/mcp-server'

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