Advancements that occurred during the last years in the diagnosis of Mycobacterium tuberculosis (Mtb), the causative agent of tuberculosis infection, have prompted increased survival rates of patients. However, limitations related to the inefficiency of an early detection still remain; some techniques and laboratory methods do not have enough specificity and most instruments are expensive and require handling by trained staff. In order to contribute to a prompt and effective diagnosis of tuberculosis, we report the development of a portable, user-friendly, and low-cost biosensor device for its early detection. By using a label-free surface plasmon resonance (SPR) biosensor, we have established a direct immunoassay for the direct detection and quantification of the heat shock protein X (HspX) of Mtb, a well-established biomarker of this pathogen, directly in pretreated sputum samples. The method relies on highly specific monoclonal antibodies that are previously immobilized on the plasmonic sensor surface. This technology allows for the direct detection of the biomarker without amplification steps, showing a limit of detection (LOD) of 0.63 ng mL-1 and a limit of quantification (LOQ) of 2.12 ng mL-1. The direct analysis in pretreated sputum shows significant differences in the HspX concentration in patients with tuberculosis (with concentration levels in the order of 116-175 ng mL-1) compared with non-tuberculosis infected patients (values below the LOQ of the assay).