MA

mikegc-aws/lambda-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

237 stars 50 forks 품질 52 트렌드 18MIT-0

mikegc-aws/lambda-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요

mikegc-aws/lambda-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

** ⚠️ 중요: 람다 MCP 서버 모듈 코드는 이 저장소에 보관되지 않고 유지되고 있습니다. 현재 awslabs/mcp-lambda-handler에서 호스팅 및 유지 관리되고 있습니다. 이 저장소는 모듈 사용 방법의 샘플 코드로 남아 있습니다.**

Lambda MCP 서버를 사용하려면 PyPI에서 직접 패키지를 설치하세요:

이 서버는 Streamable HTTP(SSE가 아님)를 지원하는 클라이언트가 필요합니다. 현재 Streamable HTTP를 지원하는 MCP 클라이언트가 몇 개 있으며, MCP 인스펙터도 있습니다. 이 저장소에는 Streamable HTTP 클라이언트로 Built Strands Agents도 포함되어 있습니다.

이 프로젝트는 AWS Lambda를 활용해 서버리스 MCP(모델 컨텍스트 프로토콜) 도구를 강력하고 개발자 친화적인 방식으로 시연합니다. 최소한의 보일러플레이트와 뛰어난 개발자 경험을 통해 상태 없는 서버리스 MCP 서버를 구축하는 방법을 보여줍니다.

the_context()

the_context의 한 에피소드에서 티파니 수터레와 마이크는 MCP용 스트리밍 가능한 HTTP와 이 프로젝트의 (구버전) 운영에 대해 논의했습니다:

예시

다음은 AWS Lambda 함수에서 MCP 서버를 실행하는 최소 코드입니다:

세션 상태 관리

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Lambda MCP Server Demo (Streamable HTTP)

⚠️ IMPORTANT: The Lambda MCP Server module code IS maintained, just not in this repository. It is now hosted and maintained at awslabs/mcp-lambda-handler. This repository remains as sample code of how to use the module.

To use the Lambda MCP Server, install the package directly from PyPI:

pip install awslabs.mcp_lambda_handler
# or, if using uv:
uv add awslabs.mcp_lambda_handler

This server requires a client that supports Streamable HTTP (not SSE). There are a few MCP clients that currently support Streamable HTTP including the MCP Inspector. There is also as a Streamable HTTP client included in this repo, built Strands Agents.

This project demonstrates a powerful and developer-friendly way to create serverless MCP (Model Context Protocol) tools using AWS Lambda. It showcases how to build a stateless, serverless MCP server with minimal boilerplate and an excellent developer experience.

the_context()

In an episode of the_context, Tiffany Souterre and Mike discussed streamable HTTP for MCP as well as running (an older version of) this project:

Example

Here is the minimal code to get an MCP server running in an AWS Lambda function:

from awslabs.mcp_lambda_handler import MCPLambdaHandler

mcp_server = MCPLambdaHandler(name="mcp-lambda-server", version="1.0.0")

@mcp_server.tool()
def get_time() -> str:
    from datetime import datetime, UTC
    return datetime.now(UTC).isoformat()

def lambda_handler(event, context):
    return mcp_server.handle_request(event, context)

Session State Management

The Lambda MCP Server includes built-in session state management that persists across tool invocations within the same conversation. This is particularly useful for tools that need to maintain context or share data between calls.

Session data is stored in a DynamoDB table against a sessionId key. This is all managed for you.

Here’s an example of how to use session state:

from lambda_mcp.lambda_mcp import LambdaMCPServer

session_table = os.environ.get('MCP_SESSION_TABLE', 'mcp_sessions')

mcp_server = LambdaMCPServer(name="mcp-lambda-server", version="1.0.0", session_store=session_table)

@mcp_server.tool()
def increment_counter() -> int:
    """Increment a session-based counter."""
    # Get the current counter value from session state, default to 0 if not set
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →