MCP2Lambda

v1.0.0Cloud Servicesstable

Enables AI models to interact with AWS Lambda functions via the MCP protocol, allowing access to private resources, real-time data, and custom computation in a secure environment.

aiawsaws-lambdagenerative-aimcp
Share:
110
Stars
0
Downloads
0
Weekly
0/5

What is MCP2Lambda?

MCP2Lambda is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai models to interact with aws lambda functions via the mcp protocol, allowing access to private resources, real-time data, and custom computation in a secure environment.

Enables AI models to interact with AWS Lambda functions via the MCP protocol, allowing access to private resources, real-time data, and custom computation in a secure environment.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables AI models to interact with AWS Lambda functions via

Use Cases

AWS Lambda function invocation
Serverless computation access
Private resource integration
danilop

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMar 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp2lambda

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP2Lambda

MCP2Lambda is a Python-based MCP server that bridges AI models to AWS Lambda functions, allowing Claude and other MCP clients to invoke any Lambda function in your AWS account as if it were a native tool. At startup it can auto-discover all available Lambda functions and register each one as an individual MCP tool, or it can operate in generic mode for broader access. It is designed for teams that want to give AI assistants secure, serverless access to private resources, custom computation, real-time data, or internal business logic without exposing those systems directly.

Prerequisites

  • Python 3.10 or higher with uv or pip
  • AWS CLI configured with credentials that have lambda:InvokeFunction and lambda:ListFunctions permissions (run 'aws configure')
  • At least one AWS Lambda function deployed in your account
  • An MCP-compatible client such as Claude Desktop
1

Install via Smithery (easiest)

Use the Smithery CLI to install MCP2Lambda directly into your Claude Desktop configuration in one command.

npx -y @smithery/cli install @danilop/MCP2Lambda --client claude
2

Alternative: clone and set up manually

Clone the repository and configure AWS credentials if you prefer a manual setup.

git clone https://github.com/danilop/MCP2Lambda.git
cd MCP2Lambda
aws configure
3

Start the MCP server

Run the server with uv. By default, PRE_DISCOVERY is enabled and the server registers each Lambda function as a separate MCP tool at startup.

cd MCP2Lambda
uv run main.py

# To disable pre-discovery and use generic invoke tools instead:
uv run main.py --no-pre-discovery
4

Add to Claude Desktop config

Register MCP2Lambda in claude_desktop_config.json. AWS credentials are picked up from the environment or from ~/.aws/credentials via the standard AWS credential chain.

{
  "mcpServers": {
    "mcp2lambda": {
      "command": "uv",
      "args": ["run", "/path/to/MCP2Lambda/main.py"],
      "env": {
        "AWS_REGION": "us-east-1",
        "PRE_DISCOVERY": "true"
      }
    }
  }
}
5

Add a system prompt and start querying

Optionally add a system prompt telling Claude to use Lambda tools for answers. Then query Claude using natural language and it will invoke the appropriate Lambda function.

MCP2Lambda Examples

Client configuration

Claude Desktop config for MCP2Lambda with pre-discovery enabled. AWS credentials are resolved from the standard AWS credential chain.

{
  "mcpServers": {
    "mcp2lambda": {
      "command": "uv",
      "args": ["run", "/path/to/MCP2Lambda/main.py"],
      "env": {
        "AWS_REGION": "us-east-1",
        "PRE_DISCOVERY": "true"
      }
    }
  }
}

Prompts to try

Example prompts using the sample Lambda functions included in the repository, or your own custom functions.

- "Get the customer ID for the email address [email protected]"
- "Retrieve the full customer profile for customer ID 12345"
- "Calculate the number of prime numbers between 1 and 1,000,000 using the RunPythonCode function"
- "List all available Lambda tools you have access to"
- "Invoke my OrderStatus Lambda function with order ID ORD-9876 and return the result"

Troubleshooting MCP2Lambda

Server starts but no Lambda tools appear in Claude

Ensure your AWS credentials have lambda:ListFunctions permission and that PRE_DISCOVERY is set to true. Run 'aws lambda list-functions' from the command line to verify credentials work. If the Lambda list is very large, pre-discovery may be slow — consider using --no-pre-discovery for faster startup with a generic invocation tool instead.

Lambda invocation fails with 'AccessDeniedException'

The AWS identity used by MCP2Lambda needs lambda:InvokeFunction permission on the target functions. Attach an IAM policy granting this permission to your configured IAM user or role. You can scope the policy to specific function ARNs for least-privilege access.

uv run main.py fails with import errors

Ensure uv is installed (curl -LsSf https://astral.sh/uv/install.sh | sh) and run 'uv sync' inside the MCP2Lambda directory first to install all dependencies into the project's virtual environment. Then retry uv run main.py.

Frequently Asked Questions about MCP2Lambda

What is MCP2Lambda?

MCP2Lambda is a Model Context Protocol (MCP) server that enables ai models to interact with aws lambda functions via the mcp protocol, allowing access to private resources, real-time data, and custom computation in a secure environment. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP2Lambda?

Follow the installation instructions on the MCP2Lambda GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP2Lambda?

MCP2Lambda works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP2Lambda free to use?

Yes, MCP2Lambda is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp2lambda": { "command": "npx", "args": ["-y", "mcp2lambda"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP2Lambda?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides