In edge computing (EC), offloading tasks to edge servers or the cloud can significantly enhance system performance. However, due to the heterogeneous and dynamic traffic distribution in edge computing, it is challenging for a single edge server to provide satisfactory computing services anytime and anywhere. This issue has spurred research on collaboration among edge servers. Previous server cooperation algorithms have been limited by a one-hop cooperation area restriction. Even though some studies have extended the cooperation area to multiple hops, they still fail to support the core issue in edge computing, namely task offloading. This paper proposes a novel distributed, borderless server cooperation algorithm model called CoTree, which incorporates task offloading strategies. Its cooperation domain is unrestricted, with each server forming its own basic cooperation unit (BCU) and calculating its declared capacity based on the BCU. Additionally, it considers factors such as server computing capacity, processing delay, and the forwarding delay of tasks and computation results. Simulation results demonstrate that CoTree outperforms previous research efforts in terms of performance.