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
3 changes: 3 additions & 0 deletions mcpgateway/services/tool_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,9 @@ async def invoke_tool(
gateway_id = getattr(tool, "gateway_id", None)
if gateway_id and isinstance(gateway_id, str):
global_context.server_id = gateway_id
# Propagate user email to global context for plugin access
if app_user_email and isinstance(app_user_email, str):
global_context.user = app_user_email
else:
# Create new context (fallback when middleware didn't run)
# Use correlation ID from context if available, otherwise generate new one
Expand Down
Loading