
Serverless-Web-MCP-Server
3 years
Works with Finder
1
Github Watches
0
Github Forks
1
Github Stars
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
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:
- MCP Protocol Handler: Implements the JSON-RPC interface and message handling
- Unified Deployment Service: Manages deployments across different types (backend, frontend, fullstack)
- 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.
相关推荐
🧑🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.
🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.
⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.
Ein Plugin-basiertes Gateway, das andere MCPs orchestriert und es Entwicklern ermöglicht, auf IT-Agenten zu bauen.
Erstellen Sie einfach LLM -Tools und -Argarten mit einfachen Bash/JavaScript/Python -Funktionen.
😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / diskord / telegram / slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Diffy 、 Claude 、 Gemini 、 xai 、 ppio 、 、 ulama 、 lm Studio 、阿里云百炼、火山方舟、 siliconflow 、 qwen 、 mondshot 、 chatglm 、 sillytraven 、 mcp 等 llm 的机器人 / agent | LLM-basierte Instant Messaging Bots-Plattform, unterstützt Zwietracht, Telegramm, Wechat, Lark, Dingtalk, QQ, Slack
Reviews

user_1uniaUvW
I've been using serverless-web-mcp-server by bnusunny, and it's transformative. The ease of deployment and scalability has significantly enhanced my web projects. No server management needed, making it perfect for rapid development. Highly recommend for anyone looking to streamline their backend processes!

user_iE5MWLVR
The serverless-web-mcp-server by bnusunny is a fantastic product for anyone looking to improve their web application's performance without managing servers. The seamless deployment and scalability features make it incredibly convenient. Since using this server, my productivity has soared, and downtime has been non-existent. Highly recommend it to all developers!

user_4RgC5eDK
As a dedicated user of serverless-web-mcp-server, I am genuinely impressed with its seamless performance and efficiency. Developed by bnusunny, this solution has significantly streamlined my web development process, eliminating the need for server management. Its user-friendly interface and scalability are simply unmatched. Highly recommended for anyone looking to optimize their development workflow!

user_KYR6PifD
I have been using serverless-web-mcp-server by bnusunny and it has significantly streamlined my web development workflow. Its serverless architecture makes deployment incredibly fast and efficient. Highly recommended for developers seeking a reliable and scalable solution.

user_g3tMOnMe
As a loyal user of serverless-web-mcp-server by bnusunny, I must say this product transformed my web management experience. It's incredibly efficient, requiring minimal setup, truly embodying the essence of serverless technology. The seamless integration and welcome information make it beginner-friendly yet powerful for advanced users. Highly recommended!

user_soyeIwiM
I am thoroughly impressed with bnusunny's serverless-web-mcp-server! Its seamless integration and efficient design make deploying serverless applications a breeze. The functionality and ease of use are top-notch, greatly simplifying the development process. Highly recommended for anyone looking to enhance their serverless architecture. Kudos to the developer!

user_HHQTbLqr
As a loyal user of serverless-web-mcp-server by bnusunny, I must say this product is exceptionally impressive. It seamlessly allows deployment and management of serverless applications, saving both time and resources. The intuitive design and clear welcome message make the onboarding process a breeze. I highly recommend this to anyone looking to simplify their serverless workflows.

user_KUV9jkzY
The serverless-web-mcp-server by bnusunny is a game-changer for web applications. Its serverless architecture provides unparalleled scalability and ease of use, eliminating the need for server management. The seamless integration and user-friendly setup are impressive. Highly recommended for developers looking to enhance their web projects efficiently.