Due to the many applications of the travelling salesman problem, solving this problem has been considered by many researchers. One of the subsets of the travelling salesman problem is the metric travelling salesman problem in which a triangular inequality is observed. This is a crucial problem in combinatorial optimization as it is used as a standard problem as a basis for proving complexity or providing solutions to other problems in this class. The solution is used usually in logistics, manufacturing and other areas for cost minimization. Since this is an NP-hard problem, heuristic and meta-heuristic algorithms seek near-optimal solutions in polynomial time as numerical solutions. For this purpose, in this paper, a heuristic algorithm based on the minimum spanning tree is presented to solve this problem. Then, by generating 20 instances, the efficiency of the proposed algorithm was compared with one of the most famous algorithms for solving the travelling salesman problem, namely the nearest neighbour algorithm and the ant colony optimization algorithm. The results show that the proposed algorithm has good convergence to the optimal solution. In general, the proposed algorithm has a balance between runtime and the solution found compared to the other two algorithms. So the nearest neighbour algorithm has a very good runtime to reach the solution but did not have the necessary convergence to the optimal solution, and vice versa, the ant colony algorithm converges very well to the optimal solution, but, its runtime solution is very longer than the proposed algorithm.