Skip to content

Commit 476ce05

Browse files
committed
fix: set the fastmcp log level to be the same as the proxy (aws#101)
* docs: add a notice about Cline and log level * fix: set the fastmcp log level to be the same as the proxy
1 parent 33dfe05 commit 476ce05

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ Add the following configuration to your MCP client config file (e.g., for Amazon
146146
}
147147
```
148148

149+
> [!NOTE]
150+
> Cline users should not use `--log-level` argument because Cline checks the log messages in stderr for text "error" (case insensitive).
151+
149152
#### Using Docker
150153

151154
```json

mcp_proxy_for_aws/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ async def client_factory():
174174

175175
if args.retries:
176176
add_retry_middleware(proxy, args.retries)
177-
await proxy.run_async(transport='stdio')
177+
await proxy.run_async(transport='stdio', show_banner=False, log_level=args.log_level)
178178
except Exception as e:
179179
logger.error('Cannot start proxy server: %s', e)
180180
raise e

tests/unit/test_server.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ async def test_setup_mcp_mode(
102102
mock_fastmcp_proxy.assert_called_once()
103103
mock_add_filtering.assert_called_once_with(mock_proxy, True)
104104
mock_add_retry.assert_called_once_with(mock_proxy, 1)
105-
mock_proxy.run_async.assert_called_once_with(transport='stdio')
105+
mock_proxy.run_async.assert_called_once_with(
106+
transport='stdio', show_banner=False, log_level='INFO'
107+
)
106108

107109
@patch('mcp_proxy_for_aws.server.ProxyClient')
108110
@patch('mcp_proxy_for_aws.server.create_transport_with_sigv4')
@@ -176,7 +178,9 @@ async def test_setup_mcp_mode_no_retries(
176178
mock_client_class.assert_called_once_with(mock_transport)
177179
mock_fastmcp_proxy.assert_called_once()
178180
mock_add_filtering.assert_called_once_with(mock_proxy, False)
179-
mock_proxy.run_async.assert_called_once_with(transport='stdio')
181+
mock_proxy.run_async.assert_called_once_with(
182+
transport='stdio', show_banner=False, log_level='INFO'
183+
)
180184

181185
@patch('mcp_proxy_for_aws.server.ProxyClient')
182186
@patch('mcp_proxy_for_aws.server.create_transport_with_sigv4')

0 commit comments

Comments
 (0)