Skip to main content
Glama
bnusunny

Serverless Web MCP Server

by bnusunny

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 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

Related MCP server: HostBridge MCP Server

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

# Install globally from npm
npm install -g serverless-web-mcp-server

# Or clone the repository
git clone https://github.com/bnusunny/serverless-web-mcp-server.git
cd serverless-web-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

Usage

Using as a Local MCP Server

To use with Claude for Desktop or other MCP clients, add the server to your client configuration:

For Claude for Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "serverless-web": {
      "command": "serverless-web-mcp"
    }
  }
}

After configuring, restart Claude for Desktop. You should see the serverless-web tools available in the Claude interface.

Command Line Options

Usage:
  serverless-web-mcp [options]

Options:
  --debug, -d                 Enable debug logging
  --templates, -t <path>      Specify templates directory path
  --transport, -m <mode>      Transport method (stdio or http, default: stdio)
  --port, -p <number>         HTTP server port (default: 3000, only used with http transport)
  --help, -h                  Show this help message
  
Environment Variables:
  MCP_TRANSPORT               Transport method (stdio or http, default: stdio)
  PORT                        HTTP server port (default: 3000)
  TEMPLATES_PATH              Path to templates directory

Resource Discovery

To discover available resources and tools, use the following methods:

List Resources

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "resource/list",
  "params": {}
}

This will return a list of all available resources with their patterns and descriptions.

List Tools

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tool/list",
  "params": {}
}

This will return a list of all available tools with their descriptions and parameter schemas.

Example Tool Invocation

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tool/invoke",
  "params": {
    "name": "deploy",
    "parameters": {
      "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"
        }
      }
    }
  }
}

Example Resource Request

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "resource/get",
  "params": {
    "uri": "deployment:my-api"
  }
}

Deployment Parameters

Backend Deployment

{
  "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" }
      ]
    }
  }
}

Frontend Deployment

{
  "deploymentType": "frontend",
  "projectName": "my-website",
  "projectRoot": "/path/to/project",
  "region": "us-east-1",
  "frontendConfiguration": {
    "builtAssetsPath": "frontend/build",
    "indexDocument": "index.html"
  }
}

Fullstack Deployment

{
  "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"
  }
}

Development

Project Structure

/
├── src/
│   ├── mcp/              # MCP protocol implementation
│   │   ├── tools/        # Tool implementations
│   │   │   └── index.ts  # Tool registration
│   │   ├── resources/    # Resource implementations
│   │   │   └── index.ts  # Resource registration
│   │   └── server.ts     # MCP server setup
│   ├── deployment/       # Deployment service
│   ├── cli/              # Command line interface
│   └── index.ts          # Main server entry point
├── templates/            # Deployment templates
├── examples/             # Example applications
├── docs/                 # Documentation
├── config.json           # Server configuration
├── DESIGN.md             # Detailed design document
└── README.md             # This file

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Available Tools

5 tools
deployC

Deploy web applications to AWS, including database resources like DynamoDB tables.

ParametersJSON Schema
NameRequiredDescriptionDefault
deploymentTypeYesType of deployment
projectNameYesProject name
projectRootYesAbsolute path to the project root directory
regionNoAWS regionus-east-1
backendConfigurationNoBackend configuration
frontendConfigurationNoFrontend configuration

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It only hints at creating DynamoDB tables but omits critical details: what gets destroyed, permissions needed, idempotency, rollback, cost implications, or return behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is concise but lacks structure. It front-loads the main action but does not enumerate key aspects or use bullet points for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (nested objects, no output schema, no annotations), the description is insufficient. It fails to explain the deployment lifecycle, prerequisites, or what happens to existing resources.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds marginal value by mentioning database resources, which aligns with backendConfiguration, but does not provide additional insight beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'deploy' and resource 'web applications to AWS', mentioning database resources. It distinguishes from siblings like deployment_help or get_logs. However, it could be more specific about the types of deployments (e.g., static sites vs APIs).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like update_frontend. The description does not mention prerequisites, when not to use, or compare with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

deployment_helpB

Get help with deployment requirements and troubleshooting

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYesHelp topic

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It states 'get help' but does not specify if the tool is read-only, what it returns (e.g., text, commands), or any side effects. The minimal disclosure leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no redundancy. It is appropriately concise, though it could include slightly more detail without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (single enum parameter, no output schema), the description covers the basic purpose. However, it lacks details on response format or limitations, which would help users know what to expect from a help tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a single enum parameter. The description adds no additional parameter information beyond the schema's 'Help topic'. Given high coverage, baseline 3 applies – the description does not enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides help with deployment requirements and troubleshooting, distinguishing it from action-oriented siblings like deploy or get_logs. However, 'help' is somewhat vague; it could specify the nature of assistance (e.g., documentation, suggestions).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when deployment help is needed, but lacks explicit guidance on when to use this tool versus alternatives or when not to. With siblings performing specific tasks, the context is clear, but no exclusion criteria are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_logsC

Retrieve application logs from CloudWatch

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNameYesName of the deployed project
regionNoAWS regionus-east-1
logGroupNameNoSpecific log group name (if known)
filterPatternNoCloudWatch Logs filter pattern
startTimeNoStart time for logs (ISO format)
endTimeNoEnd time for logs (ISO format)
limitNoMaximum number of log entries to retrieve

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must carry the full burden. It does not disclose behavioral traits such as read-only nature, authentication requirements, rate limits, or response behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (6 words) and to the point. It could be improved with a bit more context, but it is not excessively long.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters and no output schema or annotations, the description is too brief. It does not explain return format, parameter interplay, or typical use cases, leaving gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema, as it is a generic statement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Retrieve application logs from CloudWatch,' identifying the action and resource. It is distinct from sibling tools like deploy and get_metrics, which address different domains.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives or when not to use it. The description lacks any context for appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_metricsB

Fetch performance metrics for deployed applications

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNameYesName of the deployed project
regionNoAWS regionus-east-1
resourcesNoResources to get metrics for
startTimeNoStart time for metrics (ISO format)
endTimeNoEnd time for metrics (ISO format)
periodNoPeriod in seconds for metrics aggregation
statisticsNoStatistics to retrieve

TDQS

B3.2/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so description must disclose behavioral traits. It only states 'Fetch performance metrics' without mentioning idempotency, permissions, error behavior, or side effects. This is insufficient for an agent to understand the tool's operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no unnecessary words. It is efficiently front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters and no output schema, the description fails to explain return values, time ranges, resource scope, or error handling. It leaves substantial gaps for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are fully documented in the schema. The description adds no additional meaning beyond what the schema provides, maintaining the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it fetches performance metrics for deployed applications, distinguishing it from sibling tools like get_logs (logs) or deploy (deployment). The verb 'fetch' and resource 'performance metrics' are specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. The description implies it's for metrics retrieval, but does not mention alternatives or constraints. Context from sibling names provides some implicit guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_frontendB

Update frontend assets without redeploying the entire infrastructure

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNameYes
projectRootYes
regionNous-east-1
builtAssetsPathYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must convey all behavioral traits. It mentions 'update' implying mutation, but fails to disclose whether it is destructive, requires permissions, or what happens to existing assets. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It is appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters and no output schema or annotations, the description is too sparse. It lacks parameter semantics and behavioral details, leaving significant gaps for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no explanation of any parameter. Parameter names alone are insufficient for an agent to correctly populate them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates frontend assets and distinguishes it from full redeployment. It uses a specific verb ('Update') and resource ('frontend assets'), and implies a different use case than sibling 'deploy'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description indicates when to use the tool (updating frontend assets without full redeploy) and implicitly distinguishes from the sibling 'deploy'. However, it lacks explicit guidance on when not to use or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: deploying, getting help, retrieving logs, fetching metrics, and updating frontend assets. No ambiguity between them.

Naming Consistency3/5

Most tools follow a verb_noun pattern (get_logs, get_metrics, update_frontend), but 'deploy' is a lone verb without an object, and 'deployment_help' is a noun+verb compound. This inconsistency could be confusing.

Tool Count5/5

Five tools is well-scoped for a server focused on deployment and management of web apps on AWS. It covers essential operations without being excessive.

Completeness3/5

Core deployment, updates, logs, and metrics are covered, but missing operations like rollback, undeploy, or database updates create notable gaps for full lifecycle management.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/bnusunny/serverless-web-mcp-server'

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