From 499a3cb1707c2bc45012d5a29a7c0aa17a4239b7 Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Fri, 26 Dec 2025 03:26:33 +0100 Subject: [PATCH] debug cleanup --- mcp/server.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mcp/server.py b/mcp/server.py index 298bcb5..23b2b69 100644 --- a/mcp/server.py +++ b/mcp/server.py @@ -35,18 +35,12 @@ mcp = FastMCP("Cavepedia MCP") def get_user_roles() -> list[str]: """Extract user roles from the X-User-Roles header.""" headers = get_http_headers() - print(f"DEBUG: All headers received: {dict(headers)}") roles_header = headers.get("x-user-roles", "") - print(f"DEBUG: x-user-roles header value: '{roles_header}'") if roles_header: try: - roles = json.loads(roles_header) - print(f"DEBUG: Parsed roles: {roles}") - return roles - except json.JSONDecodeError as e: - print(f"DEBUG: JSON decode error: {e}") + return json.loads(roles_header) + except json.JSONDecodeError: return [] - print("DEBUG: No roles header found, returning empty list") return [] def is_sources_only() -> bool: