feat: unified aws-mcp-servers example family (MCP 2026-07-28 on Lambda and AgentCore) - #817
Open
czubocha wants to merge 9 commits into
Open
feat: unified aws-mcp-servers example family (MCP 2026-07-28 on Lambda and AgentCore)#817czubocha wants to merge 9 commits into
czubocha wants to merge 9 commits into
Conversation
…al SDK on Lambda with streaming)
…yle MRTR elicitation, header allowlist, multi-tool handler)
…features on both front doors
…rver and test client - new top-level aws-mcp-servers/ hub: rest-api, function-url, hono (official @modelcontextprotocol/hono + streamHandle), express-web-adapter (LWA zip), fastify-container (LWA container image), umbrella README with comparison tables, pointer stubs to the AgentCore-hosted variants - every example serves the same canonical MCP server (tools with streamed progress and an elicitation round-trip, resources incl. a template, a prompt, server/discover instructions, cache hints) and ships the same client.mjs (12 protocol checks incl. -32020/-32021 negatives, LONG=1 36s streaming case, SigV4 mode) - AgentCore Runtime mcp-server example aligned to the same server surface - all six examples live-verified 13/13 with the shared client
Edge-optimized REST endpoints cut streams that stay idle for 30 seconds, and the clock starts at invoke rather than at the first byte, so a tool that computes quietly for longer than that fails even with a raised timeoutInMillis. Measured on one function with timeoutInMillis 120000 and an identical 36s silent call: HTTP 504 after 30.4s on edge, HTTP 200 after 37.4s on regional. The examples passed their own suites on edge only because the demo tool emits progress every 800ms, which keeps the stream non-idle. Both REST-fronted examples now set endpointType REGIONAL, with the reason in a comment, and the READMEs note the constraint for long-running tools.
The suite's long-call case streams progress every 800ms, which keeps a stream non-idle and therefore passes even on an endpoint that kills idle streams - the reason the edge-endpoint defect went unnoticed. Adds a companion case that stays silent for ~36s and returns plain JSON, which is the shape that fails there (HTTP 504 at ~30s on edge, 200 on regional). Verified 14/14 against the canonical server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new top-level
aws-mcp-servers/hub with every way to host a Model Context Protocol server on AWS, plus alignment of the existing AgentCore MCP examples to the same surface:rest-apitransferMode: streamfunction-urlinvokeMode: RESPONSE_STREAMhono@modelcontextprotocol/hono+ Hono'sstreamHandleexpress-web-adapterfastify-containeragentcore-runtime/agentcore-gatewayEvery example serves the same canonical MCP server (official MCP TypeScript SDK v2, protocol
2026-07-28): tools with streamed SSE progress and a stateless elicitation round-trip, resources incl. a URI template, a prompt,server/discoverinstructions, and configured cache hints — with authentication (gateway authorizer / IAM / in-processrequireBearerAuth) as complete commented extensions.The umbrella README carries the comparison tables (front doors, capabilities per hosting, pricing links) and explains that web framework, packaging, and front door are three independent choices.
Testing
Each example ships the identical
client.mjs(canonical copy ataws-mcp-servers/, drift-checked byvalidate.js): 12 protocol checks including two negative cases (-32020header mismatch,-32021missing capability), aLONG=1~36-second streaming case, and a SigV4 mode for AgentCore Runtime / IAM endpoints.All six deployable examples were deployed and verified 13/13 with this client against live endpoints (both API Gateway REST stream and Function URLs, plus AgentCore Runtime), then removed.
npm run validateandnpm run docspass;examples.jsonand the root README are regenerated (125 first-party examples).