From b78729c07b3b9eef444a0b2488b92e6635eb8bb6 Mon Sep 17 00:00:00 2001 From: Weizhou Xing <169175349+wzxxing@users.noreply.github.com> Date: Wed, 26 Nov 2025 21:04:25 +0100 Subject: [PATCH 1/3] remove unnecessary comment --- mcp_proxy_for_aws/server.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/mcp_proxy_for_aws/server.py b/mcp_proxy_for_aws/server.py index 9becb18..bcdaad3 100644 --- a/mcp_proxy_for_aws/server.py +++ b/mcp_proxy_for_aws/server.py @@ -56,8 +56,6 @@ @contextlib.asynccontextmanager async def _initialize_client(transport: ClientTransport): """Handle the exceptions for during client initialize.""" - # line = sys.stdin.readline() - # logger.debug('First line from kiro %s', line) async with contextlib.AsyncExitStack() as stack: try: client = await stack.enter_async_context(ProxyClient(transport)) From 6f6b1542f52175872e6c20e61c4665b631c5df90 Mon Sep 17 00:00:00 2001 From: Weizhou Xing <169175349+wzxxing@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:26:48 +0100 Subject: [PATCH 2/3] fix: no need to write initialize result to stdout, the server will request again and the use the cached results from the client --- mcp_proxy_for_aws/server.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mcp_proxy_for_aws/server.py b/mcp_proxy_for_aws/server.py index bcdaad3..0438bdb 100644 --- a/mcp_proxy_for_aws/server.py +++ b/mcp_proxy_for_aws/server.py @@ -59,14 +59,6 @@ async def _initialize_client(transport: ClientTransport): async with contextlib.AsyncExitStack() as stack: try: client = await stack.enter_async_context(ProxyClient(transport)) - if client.initialize_result: - print( - client.initialize_result.model_dump_json( - by_alias=True, - exclude_none=True, - ), - file=sys.stdout, - ) except httpx.HTTPStatusError as http_error: logger.error('HTTP Error during initialize %s', http_error) response = http_error.response From cb74a0e16c7780b7584dd4a255100a53b23523c1 Mon Sep 17 00:00:00 2001 From: Weizhou Xing <169175349+wzxxing@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:28:52 +0100 Subject: [PATCH 3/3] add __init__.py to middleware module --- mcp_proxy_for_aws/middleware/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mcp_proxy_for_aws/middleware/__init__.py diff --git a/mcp_proxy_for_aws/middleware/__init__.py b/mcp_proxy_for_aws/middleware/__init__.py new file mode 100644 index 0000000..e69de29