Serverless Web MCP Server

by bnusunny

1 135 downloads Not rated yet

About

# Serverless Web MCP Server A Model Context Protocol (MCP) server implementation for deploying web applications to AWS serverless infrastructure. ## Overview This project implements an MCP server that enables LLM coding agents to deploy web applications to AWS serverless services. It follows the [Model Context…

Explore

- Deploy web apps to AWS serverless infrastructure via MCP tools
- Supports backend (Lambda + API Gateway), frontend (S3 + CloudFront), and fullstack deployments
- Exposes tools: deploy, get_logs, get_metrics, deployment_help, update_frontend
- Provides resources for templates and existing deployments
- Uses AWS Lambda Web Adapter for running web frameworks on Lambda without code changes
- Configurable transport modes (stdio or HTTP) and debug logging

- Node.js 18 or higher
- AWS SAM CLI
- AWS credentials configured

The server supports a unified approach to deployments with different types:

- Backend Deployment: Backend services using Lambda + API Gateway
- Frontend Deployment: Frontend applications using S3 + CloudFront
- Fullstack Deployment: Combined backend and frontend deployment

npm install -g serverless-web-mcp-server

npm install

{
  "deploymentType": "backend",
  "projectName": "my-api",
  "projectRoot": "/path/to/project",
  "region": "us-east-1",
  "backendConfiguration": {
    "builtArtifactsPath": "backend/dist",
    "runtime": "nodejs18.x",
    "startupScript": "bootstrap",
    "memorySize": 512,
    "timeout": 30,
    "environment": {
      "NODE_ENV": "production"
    },
    "databaseConfiguration": {
      "tableName": "Users",
      "attributeDefinitions": [
        { "name": "id", "type": "S" }
      ],
      "keySchema": [
        { "name": "id", "type": "HASH" }
      ]
    }
  }
}
{
  "deploymentType": "frontend",
  "projectName": "my-website",
  "projectRoot": "/path/to/project",
  "region": "us-east-1",
  "frontendConfiguration": {
    "builtAssetsPath": "frontend/build",
    "indexDocument": "index.html"
  }
}
{
  "deploymentType": "fullstack",
  "projectName": "my-fullstack-app",
  "projectRoot": "/path/to/project",
  "region": "us-east-1",
  "backendConfiguration": {
    "builtArtifactsPath": "backend/dist",
    "runtime": "nodejs18.x",
    "environment": {
      "NODE_ENV": "production"
    }
  },
  "frontendConfiguration": {
    "builtAssetsPath": "frontend/build",
    "indexDocument": "index.html"
  }
}

deploy

Deploy web applications to AWS serverless infrastructure

get_logs

Retrieve application logs from CloudWatch

get_metrics

Fetch performance metrics for deployed applications

deployment_help

Get help with deployment requirements and troubleshooting

update_frontend

Update frontend assets without redeploying the entire infrastructure

Exposes deployment capabilities as tools:
- deploy: Deploy web applications to AWS serverless infrastructure
- get_logs: Retrieve application logs from CloudWatch
- get_metrics: Fetch performance metrics for deployed applications
- deployment_help: Get help with deployment requirements and troubleshooting
- update_frontend: Update frontend assets without redeploying the entire infrastructure

A Model Context Protocol (MCP) server implementation for deploying web applications to AWS serverless infrastructure.

Overview

This project implements an MCP server that enables LLM coding agents to deploy web applications to AWS serverless services. It follows the Model Context Protocol specification to provide a standardized interface for AI agents to interact with AWS deployment capabilities.

The server supports deploying:
- Backend services using API Gateway, Lambda with Web Adapter, and DynamoDB/Aurora Serverless
- Frontend applications using S3 and CloudFront
- Fullstack applications combining both backend and frontend components

MCP Implementation

This server implements the Model Context Protocol with the following features:

Resources

Provides contextual information about:
- Available deployment templates (template:list, template:{name})
- Existing deployments and their status (deployment:list, deployment:{project-name})

Tools

Exposes deployment capabilities as tools:
- deploy: Deploy web applications to AWS serverless infrastructure
- get_logs: Retrieve application logs from CloudWatch
- get_metrics: Fetch performance metrics for deployed applications
- deployment_help: Get help with deployment requirements and troubleshooting
- update_frontend: Update frontend assets without redeploying the entire infrastructure

Architecture

The server consists of these core components:

1. MCP Protocol Handler: Implements the JSON-RPC interface and message handling
2. Unified Deployment Service: Manages deployments across different types (backend, frontend, fullstack)
3. AWS Integration Layer: Interfaces with AWS SAM CLI and AWS services

Deployment Types

The server supports a unified approach to deployments with different types:

- Backend Deployment: Backend services using Lambda + API Gateway
- Frontend Deployment: Frontend applications using S3 + CloudFront
- Fullstack Deployment: Combined backend and frontend deployment

AWS Lambda Web Adapter

For backend and fullstack deployments, the server uses AWS Lambda Web Adapter to run web applications on AWS Lambda. This allows developers to use familiar web frameworks without any code changes.

Getting Started

Prerequisites

- Node.js 18 or higher
- AWS SAM CLI
- AWS credentials configured

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.