From 1b4d5ca0ddb2e06c3401eee87b5813b0c0617866 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 3 Apr 2026 17:40:22 +0100 Subject: [PATCH] patch: mcp identity --- application/agents/tools/mcp_tool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/agents/tools/mcp_tool.py b/application/agents/tools/mcp_tool.py index 265688ea..59299def 100644 --- a/application/agents/tools/mcp_tool.py +++ b/application/agents/tools/mcp_tool.py @@ -108,8 +108,9 @@ class MCPTool(Tool): auth_key = "" if self.auth_type == "oauth": scopes_str = ",".join(self.oauth_scopes) if self.oauth_scopes else "none" + oauth_identity = self.user_id or self.oauth_task_id or "anonymous" auth_key = ( - f"oauth:{self.oauth_client_name}:{scopes_str}:{self.redirect_uri}" + f"oauth:{oauth_identity}:{self.oauth_client_name}:{scopes_str}:{self.redirect_uri}" ) elif self.auth_type in ["bearer"]: token = self.auth_credentials.get(