In view of the uncertainty of users in the process of moving , how to effectively predict and connect stable edge servers (ESs) has become the key to solve the problem. Therefore, this paper proposes a Mobile Edge Computing (MEC) algorithm based on Unscented Kalman Filter (UKF) to predict user mobility. Firstly, the ESs with computing resources are placed on the edge or node of the network, while ensuring that the battery energy of the user is sufficient. Secondly , in the process of user motion, the motion state space, estimation model and prediction model are introduced to the distributed execution of UKF. Finally, the proposed method obtains the best prediction scheme by comparing the common prediction user mobility with the linear Kalman filter prediction user mobility. The simulation results show that the proposed method greatly improves the success rate of the task.