Feature request: MCP server event handler
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 28/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, python
- Ambito
- backend-api-design, cloud
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 3.3k
- Fork
- 511
- Merge medio
- 3g 12h
- PR unite (30g)
- 93
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws-powertools/powertools-lambda-python
-
Bug: POWERTOOLS_IDEMPOTENCY_DISABLED set to an empty or non-boolean value crashes every invocationForse già presa @lechakrawarthy l’ha presa oggi. Apertabug good first issue help wanted idempotency
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
aws-powertools/powertools-lambda-python#8728 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
bug good first issue help wanted idempotency
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
aws-powertools/powertools-lambda-python#8727 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug good first issue help wanted idempotency
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
aws-powertools/powertools-lambda-python#8726 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug good first issue help wanted idempotency
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
aws-powertools/powertools-lambda-python#8725 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Bug: with a DynamoDB composite key, DataRecord.idempotency_key is the static partition key valueForse già presa @sumedh-aerram l’ha presa oggi. Apertabug good first issue help wanted idempotency
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
aws-powertools/powertools-lambda-python#8724 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di aws-powertools/powertools-lambda-python
Issue simili
-
predict_file with crop_model duplicates predictions once per imageForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
weecology/DeepForest#1445 ·
-
agent-ready priority: medium status: ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
melodic-software/claude-code-plugins#11864 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PolicyEngine/policyengine-uk#2785 ·
I maintainer di solito rispondono entro 2 giorni
-
correction metadata
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
acl-org/acl-anthology#10724 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
use-agent-os/agent-os#3739 ·
I maintainer di solito rispondono entro 1 giorno