MCP2Lambda
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.
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
Maintainer
Works with
Installation
Manual Installation
npx mcp2lambdaConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 claudeAlternative: 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 configureStart 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-discoveryAdd 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"
}
}
}
}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.
MCP2Lambda Alternatives — Similar Cloud Services Servers
Looking for alternatives to MCP2Lambda? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
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.
Set Up MCP2Lambda in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.