def enable_sse(command_or_url: str) -> bool:
    """
    Check if the command or URL is an SSE endpoint.
    """
    url = urlparse(command_or_url)
    query_params = parse_qs(url.query)
    if "transport" in query_params and query_params["transport"][0] == "sse":
        return True
    elif url.path.rstrip("/").endswith("/sse"):
        return True
    elif "/sse/" in url.path:
        return True
    return False

    Check if the command or URL is an SSE endpoint.
    
llama-index-integrations/tools/llama-index-tools-mcp/llama_index/tools/mcp/client.py