The diagnosis of mild cognitive impairment (MCI), a prodromal stage of Alzheimer's disease (AD), is essential for initiating timely treatment to delay the onset of AD. Previous studies have shown the potential of functional near-infrared spectroscopy (fNIRS) for diagnosing MCI. However, preprocessing fNIRS measurements requires extensive experience to identify poor-quality segments. Moreover, few studies have explored how proper multidimensional fNIRS features influence the classification results of the disease. Thus, this study outlined a streamlined fNIRS preprocessing method to process fNIRS measurements and compared multi-dimensional fNIRS features with neural networks in order to explore how temporal and spatial factors affect the classification of MCI and cognitive normality. More specifically, this study proposed using Bayesian optimization-based auto hyperparameter tuning neural networks to evaluate 1D channel-wise, 2D spatial, and 3D spatiotemporal features of fNIRS measurements for detecting MCI patients. The highest test accuracies of 70.83%, 76.92%, and 80.77% were achieved for 1D, 2D, and 3D features, respectively. Through extensive comparisons, the 3D time-point oxyhemoglobin feature was proven to be a more promising fNIRS feature for detecting MCI by using an fNIRS dataset of 127 participants. Furthermore, this study presented a potential approach for fNIRS data processing, and the designed models required no manual hyperparameter tuning, which promoted the general utilization of fNIRS modality with neural network-based classification to detect MCI.