refactor(mcp): access has_client_credentials on MCPServer directly

Greptile: getattr default was redundant; property exists on MCPServer and
mcp_server is non-None inside the extra_headers forwarding block.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Milan 2026-05-07 14:17:05 +03:00
parent 2ef77b0591
commit 98a4cc0ef6
No known key found for this signature in database

View file

@ -2208,9 +2208,7 @@ if MCP_AVAILABLE:
for k, v in raw_headers.items()
if isinstance(k, str)
}
skip_caller_authorization = bool(
getattr(mcp_server, "has_client_credentials", False)
)
skip_caller_authorization = bool(mcp_server.has_client_credentials)
for header_name in mcp_server.extra_headers:
if not isinstance(header_name, str):
continue