Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: superceeded by awslabs.lambda-tool-mcp-server

AWS Lambda MCP Server

A Model Context Protocol (MCP) server for AWS Lambda to select and run Lambda function as MCP tools without code changes.

Features

This MCP server acts as a bridge between MCP clients and AWS Lambda functions, allowing generative AI models to access and run Lambda functions as tools. This is useful, for example, to access private resources such as internal applications and databases without the need to provide public network access. This approach allows the model to use other AWS services, private networks, and the public internet.

graph LR
    A[Model] <--> B[MCP Client]
    B <--> C["MCP2Lambda<br>(MCP Server)"]
    C <--> D[Lambda Function]
    D <--> E[Other AWS Services]
    D <--> F[Internet]
    D <--> G[VPC]

    style A fill:#f9f,stroke:#333,stroke-width:2px
    style B fill:#bbf,stroke:#333,stroke-width:2px
    style C fill:#bfb,stroke:#333,stroke-width:4px
    style D fill:#fbb,stroke:#333,stroke-width:2px
    style E fill:#fbf,stroke:#333,stroke-width:2px
    style F fill:#dff,stroke:#333,stroke-width:2px
    style G fill:#ffd,stroke:#333,stroke-width:2px

From a security perspective, this approach implements segregation of duties by allowing the model to invoke the Lambda functions but not to access the other AWS services directly. The client only needs AWS credentials to invoke the Lambda functions. The Lambda functions can then interact with other AWS services (using the function role) and access public or private networks.

Prerequisites

  1. Install uv from Astral or the GitHub README
  2. Install Python using uv python install 3.10

Installation

Here are some ways you can work with MCP across AWS, and we'll be adding support to more products including Amazon Q Developer CLI soon: (e.g. for Amazon Q Developer CLI MCP, ~/.aws/amazonq/mcp.json):

{
  "mcpServers": {
    "awslabs.lambda-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.lambda-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "your-aws-profile",
        "AWS_REGION": "us-east-1",
        "FUNCTION_PREFIX": "your-function-prefix",
        "FUNCTION_LIST": "your-first-function, your-second-function",
        "FUNCTION_TAG_KEY": "your-tag-key",
        "FUNCTION_TAG_VALUE": "your-tag-value"
      }
    }
  }
}

The AWS_PROFILE and the AWS_REGION are optional, their defualt values are default and us-east-1.

You can specify FUNCTION_PREFIX, FUNCTION_LIST, or both. If both are empty, all functions pass the name check. After the name check, if both FUNCTION_TAG_KEY and FUNCTION_TAG_VALUE are set, functions are further filtered by tag (with key=value). If only one of FUNCTION_TAG_KEY and FUNCTION_TAG_VALUE, then no function is selected and a warning is displayed.

IMPORTANT: The function name is used as MCP tool name. The function description in AWS Lambda is used as MCP tool description. The function description should clarify when to use the function (what it provides) and how (which parameters). For example, a function that gives access to an internal Customer Relationship Management (CRM) system can use this description:

Retrieve customer status on the CRM system based on { 'customerId' } or { 'customerEmail' }

Sample functions that can be deployed via AWS SAM are provided in the examples folder.

Best practices

  • Use the FUNCTION_LIST to specify the functions that are available as MCP tools.
  • Use the FUNCTION_PREFIX to specify the prefix of the functions that are available as MCP tools.
  • Use the FUNCTION_TAG_KEY and FUNCTION_TAG_VALUE to specify the tag key and value of the functions that are available as MCP tools.
  • AWS Lambda Description property: the description of the function is used as MCP tool description, so it should be very detailed to help the model understand when and how to use the function and with with which parameters.

Security Considerations

When using this MCP server, you should consider:

  • Only Lambda functions that are in the provided list or with a name starting with the prefix are imported as MCP tools.
  • The MCP server needs permissions to invoke the Lambda functions.
  • Each Lambda function has its own permissions to optionally access other AWS resources.

Metadata

Release files for awslabs.lambda-mcp-server 0.0.2025112152

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awslabs.lambda-mcp-server 0.0.2025112152
File Size Uploaded
awslabs_lambda_mcp_server-0.0.2025112152.tar.gz 43.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awslabs.lambda-mcp-server 0.0.2025112152
File Interpreter ABI Platform
awslabs_lambda_mcp_server-0.0.2025112152-py3-none-any.whl Python 3 none any Details

Total release size: 49.5 kB

Release files / awslabs_lambda_mcp_server-0.0.2025112152.tar.gz

Download URL awslabs_lambda_mcp_server-0.0.2025112152.tar.gz
Size 43.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b645c3a873044574b456cecdbc72bb40bfb4233e87045fcaceab4098003ebf1a
BLAKE2b-256 checksum
How to use checksums
99f7dc46667b8482508cc6b58e092ed6d6c16ce10b5919bd7ba909debc7e7692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 11, 2025.

Transparency log

Release files / awslabs_lambda_mcp_server-0.0.2025112152-py3-none-any.whl

Download URL awslabs_lambda_mcp_server-0.0.2025112152-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02dea610d13b7fb219483873144aba5da29e95c64c72be12f0dddd6bf8f327ca
BLAKE2b-256 checksum
How to use checksums
0a20c57f5524951e4e1b622730ab01b879a52744d6595018fb1add39897f5d37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 11, 2025.

Transparency log

Release history Release notifications | RSS feed

1.0.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

This release

0.0.2025112152 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page