async def fetch_resources(self) -> List[Resource]:
        """
        An asynchronous method to get the resources list from MCP Client.
        """
        response = await self.client.list_resources()
        resources = response.resources if hasattr(response, "resources") else []
        if self.allowed_tools is None:
            return resources

        if any(self.allowed_tools):
            return [
                resource
                for resource in resources
                if resource.name in self.allowed_tools
            ]

        logging.warning(
            "Returning an empty resource list due to the empty `allowed_tools` list. Please ensure `allowed_tools` is set appropriately."
        )
        return []

        An asynchronous method to get the resources list from MCP Client.
        
llama-index-integrations/tools/llama-index-tools-mcp/llama_index/tools/mcp/base.py