Feature request: MCP server event handler
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- aws, python
- Lĩnh vực
- backend-api-design, cloud
Hướng nghiên cứu
Start by reading the linked API Gateway event-handler documentation and the official Python MCP SDK integration guidance. Locate the existing event_handler resolver implementation and its tests, then identify the configuration and adapter needed to run MCP tools and resources in Lambda while preserving Powertools utilities. Done means an MCPResolver can resolve Lambda events, expose tools and resources, support the shown decorators, and has focused tests plus documentation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Use case
i'd like to be able to write serverless MCP servers with ease and integrate all my powertools capabilities:
swagger, event validation, event resolver, logger, tracing, metrics etc.
Solution/User Experience
I'd like to have UX like in https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/#response-auto-serialization but combined with the official python SDK for MCP server with all the right config to make it work on a lambda.
# server.py
from aws_lambda_powertools.event_handler import MCPResolver
mcp = MCPResolver('myMcp)
# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b
# Add a dynamic greeting resource
@mcp.resource("greeting://{name}")
def get_greeting(name: str) -> str:
"""Get a personalized greeting"""
return f"Hello, {name}!"
# You can continue to use other utilities just as before
@logger.inject_lambda_context()
@tracer.capture_lambda_handler
def lambda_handler(event: dict, context: LambdaContext) -> dict:
return mcp.resolve(event, context)
Alternative solutions
use unknown open sources like MCPEngine and build my own wrappers for logging/tracer.. i want the powertools edition :)
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
- Ngôn ngữ chính
- Python
- Star
- 3.3k
- Fork
- 511
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 93
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws-powertools/powertools-lambda-python
-
Bug: POWERTOOLS_IDEMPOTENCY_DISABLED set to an empty or non-boolean value crashes every invocationCó thể đã có người làm @lechakrawarthy đã nhận hôm nay. Đang mởbug good first issue help wanted idempotency
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
aws-powertools/powertools-lambda-python#8728 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue help wanted idempotency
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
aws-powertools/powertools-lambda-python#8727 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue help wanted idempotency
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
aws-powertools/powertools-lambda-python#8726 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue help wanted idempotency
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws-powertools/powertools-lambda-python#8725 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug: with a DynamoDB composite key, DataRecord.idempotency_key is the static partition key valueCó thể đã có người làm @sumedh-aerram đã nhận hôm nay. Đang mởbug good first issue help wanted idempotency
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
aws-powertools/powertools-lambda-python#8724 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của aws-powertools/powertools-lambda-python
Issue tương tự
-
Release notes from PR titlesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[DATA] BDC portfolio DataFrame converts filed zero fair value and principal to missing valuesĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
dgunning/edgartools#1853 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Imbad0202/academic-research-skills#1039 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
openmainframeproject/feilong#980 ·
Maintainer thường phản hồi trong vòng 5 ngày