Mental stress appears in our daily life and affects our well-being and working performance. Previous studies have shown that mental stress, especially under chronic situations, can be related to obesity, heart disease, depression, or even suicide. Thus, mental stress has been recognized as the top one proxy killer. However, mental stress is not something we should necessarily avoid. When under adequate stress level, human's performance of cognitive task or sport are promoted. Therefore, it is essential to monitor stress level in daily life. This dissertation aims to build a brain-computer interface for online mental stress monitoring in the real world. We first investigated the Electroencephalography features reported in previous studies and found there are a lot of artifacts in data recorded in real-world scenarios. Hence, we moved on to investigate artifact removal methods and evaluate the performance of Artifact Subspace Reconstruction (ASR) using Independent Component Analysis (ICA). Next, we further evaluated the brain signal reconstruction ability of ASR and explored the human behaviors in a visual-oddball task conducted in a virtual environment. With all the results we obtained, we implemented ASR into our stress detection algorithms, and proposed an IC projection method to remove eye activities in real-time without performing ICA. Finally, to reduce the manufacturing cost and setup time of deployment, we investigated the effect of recording channels reduction to our stress detection algorithms. We found our stress detection algorithm with Linear Discriminant Analysis (LDA) can reach a 77\% balanced accuracy in an online scenario with only 11 recording channels placed in the frontal region.