We propose a novel method to estimate the instantaneous oscillatory phase to implement a real-time system for closed-loop sensory stimulation in electroencephalography (EEG) experiments. The method uses Kalman filter-based prediction to estimate current and future EEG signals. We tested the performance of our method in a real-time situation. We demonstrate that the performance of our method shows higher accuracy in predicting the EEG phase than the conventional autoregressive model-based method. A Kalman filter allows us to easily estimate the instantaneous phase of EEG oscillations based on the automatically estimated autoregressive model implemented in a real-time signal processing machine. The proposed method has a potential for versatile applications targeting the modulation of EEG phase dynamics and the plasticity of brain networks in relation to perceptual or cognitive functions.