The prevalence and disease burden of urolithiasis has increased substantially worldwide in the last decade, and intraluminal holmium laser lithotripsy has become the primary treatment method. However, inappropriate laser energy settings increase the risk of perioperative complications, largely due to the lack of intraoperative information on the stone composition, which determines the stone melting point. To address this issue, we developed a fiber-based fluorescence spectrometry method that detects and classifies the autofluorescence spectral fingerprints of urinary stones into three categories: calcium oxalate, uric acid, and struvite. By applying the support vector machine (SVM), the prediction accuracy achieved 90.28 % and 96.70% for classifying calcium stones versus non-calcium stones and uric acid versus struvite, respectively. High accuracy and specificity were achieved for a wide range of working distances and angles between the fiber tip and stone surface in an emulated intraoperative ambient. Our work establishes the methodological basis for engineering a clinical device that achieves real-time, in situ classification of urinary stones for optimizing the laser ablation parameters and reducing perioperative complications in lithotripsy.