Lambda MCP Server

by bx9900

253 downloads Not rated yet

About

# Lambda MCP Server A Model Context Protocol server for deploying and managing AWS Lambda functions. ## Features - Deploy Lambda functions through MCP interface - List existing Lambda functions - Guided deployment prompts - Type-safe configuration validation - AWS Lambda integration ## Prerequisites - Node.js (v16 or…

Explore

- Deploy Lambda functions through MCP interface
- List existing Lambda functions
- Guided deployment prompts
- Type-safe configuration validation
- AWS Lambda integration

- Node.js (v16 or higher)
- AWS Account with appropriate permissions
- AWS CLI configured with credentials

// Example deployment configuration
const config = {
  functionName: "my-function",
  runtime: "nodejs18.x",
  handler: "index.handler",
  memorySize: 128,
  timeout: 30,
  roleArn: "arn:aws:iam::123456789012:role/lambda-role",
  environment: {
    NODE_ENV: "production"
  }
};

// Base64 encoded zip file containing the function code
const code = "base64-encoded-zip-file";

// Deploy using the MCP tool
const result = await client.callTool("deploy", { config, code });

// Start a guided deployment process
const prompt = await client.getPrompt("guidedDeploy", {
  functionName: "my-function",
  runtime: "nodejs18.x"
});

A Model Context Protocol server for deploying and managing AWS Lambda functions.

Features

- Deploy Lambda functions through MCP interface
- List existing Lambda functions
- Guided deployment prompts
- Type-safe configuration validation
- AWS Lambda integration

Prerequisites

- Node.js (v16 or higher)
- AWS Account with appropriate permissions
- AWS CLI configured with credentials

Installation

npm install

Configuration

Create a .env file in the root directory:

AWS_REGION=us-east-1

Usage

Development Mode

npm run dev

Production Mode

npm run build
npm start

MCP Tools

Deploy Lambda Function

// Example deployment configuration
const config = {
  functionName: "my-function",
  runtime: "nodejs18.x",
  handler: "index.handler",
  memorySize: 128,
  timeout: 30,
  roleArn: "arn:aws:iam::123456789012:role/lambda-role",
  environment: {
    NODE_ENV: "production"
  }
};

// Base64 encoded zip file containing the function code
const code = "base64-encoded-zip-file";

// Deploy using the MCP tool
const result = await client.callTool("deploy", { config, code });

List Functions

// List all Lambda functions
const result = await client.callTool("listFunctions", {});

Guided Deployment

// Start a guided deployment process
const prompt = await client.getPrompt("guidedDeploy", {
  functionName: "my-function",
  runtime: "nodejs18.x"
});

Protocol Interface

The server implements the following MCP tools:

- deploy: Deploy a new Lambda function
- listFunctions: List all Lambda functions
- guidedDeploy: Interactive deployment guidance

Security Considerations

- Always use HTTPS in production
- Implement proper authentication and authorization
- Rotate AWS credentials regularly
- Use environment variables for sensitive information
- Implement proper error handling and logging

License

MIT

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.