awslabs / awslabs/run-model-context-protocol-servers-with-aws-lambda

Feature request: Caching the MCP server process across invocations

Open
#363 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
379
Forks
47
PR merge metrics
No merged PRs in 30d

Description

Today, the library always starts a fresh MCP server process on each invocation. Certain MCP servers may be able to be re-used across Lambda function invocations, and be successfully frozen and thawed between invocations to improve "warm" performance. There are security concerns around server re-use, like inadvertently sharing any in-memory state that the MCP server may save across requests. But, users can be responsible for determining whether the MCP server is safe to be re-used across function callers.

See https://github.com/awslabs/run-model-context-protocol-servers-with-aws-lambda/issues/361 for more details

Contributor guide

Open the contributing guide

Research direction

Start by reading issue #361 for the additional context and concerns around process reuse. Then inspect the library's Lambda invocation and MCP server startup paths. Done would require a defined, user-controlled reuse behavior that accounts for the stated security concerns and demonstrates the intended warm-invocation benefit.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.