Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mcp_proxy_for_aws/sigv4_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ async def _inject_metadata_hook(metadata: Dict[str, Any], request: httpx.Request
metadata: Dictionary of metadata to inject into _meta field
request: The HTTP request object
"""
logger.info('=== Outgoing Request ===')
logger.info('URL: %s', request.url)
logger.info('Method: %s', request.method)
logger.debug('=== Outgoing Request ===')
logger.debug('URL: %s', request.url)
logger.debug('Method: %s', request.method)

# Try to inject metadata if it's a JSON-RPC/MCP request
if request.content and metadata:
Expand Down Expand Up @@ -284,7 +284,7 @@ async def _inject_metadata_hook(metadata: Dict[str, Any], request: httpx.Request
)
body['params']['_meta'] = {**metadata, **existing_meta}
else:
logger.info('Replacing non-dict _meta value with injected metadata')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change! Could you also add a section in the readme under troubleshooting that Cline has some issues with logging during the connection phase and count those as errors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing this. @kyoncal This is the weird part of the cline code for your reference.

https://github.com/cline/cline/blob/04549cf1e3b6461d78f8cd95100c7b56d8529cf4/src/services/mcp/McpHub.ts#L281-L303

logger.debug('Overwriting _meta value with injected metadata')
body['params']['_meta'] = metadata

# Create new content with updated metadata
Expand All @@ -298,4 +298,4 @@ async def _inject_metadata_hook(metadata: Dict[str, Any], request: httpx.Request

except (json.JSONDecodeError, KeyError, TypeError) as e:
# Not a JSON request or invalid format, skip metadata injection
logger.error('Skipping metadata injection: %s', e)
logger.debug('Skipping metadata injection: %s', e)