In patients with intractable epilepsy, focal cortical dysplasia (FCD) is the most frequent malformation of cortical development. Identification of subtle FCD lesions using brain MRI scans is very often based on the cortical thickness measurement, where brain cortex segmentation is required as a preprocessing step. However, the accuracy of the selected segmentation method can highly affect the final FCD lesion detection. In this work, we propose an improved graph cuts algorithm integrating Markov random field-based energy function for more accurate brain cortex MRI segmentation. Our method uses three-label graph cuts and preforms automatic 3D MRI brain cortex segmentation integrating intensity and boundary information. The performance of the method is tested on both simulated MR brain images with different noise levels and real patients with FCD lesions. Experimental quantitative segmentation results showed that the proposed method is effective, robust to noise and achieves higher accuracy than other popular brain MRI segmentation methods. The qualitative validation, visually verified by a medical expert, showed that the FCD lesions were segmented well as a part of the cortex, indicating increased thickness and cortical deformation. The proposed technique can be successfully used in this, as well as in many other clinical applications.