Phosphorus and potassium are essential elements for understanding planetary habitability. Phosphorus is a key element in biological molecules involved in metabolism and RNA and DNA, but its low abundance in Earth’s crust makes it a limiting nutrient in terrestrial ecosystems. The radioactive isotope 40K is the dominant heat source in planetary interiors for the first 1-2 gigayears and important thereafter. Interior heating is necessary for degassing, building an atmosphere, and maintaining a stable climate. Despite their importance, there are vey few stars with measured abundances of K and P due to difficulties in observing them from the ground. We propose a CubeSat with a moderately high resolution (R = 25,000) near-infrared (0.9–1.6 micron) spectrograph that will obtain precision abundances for P, K, and ancillary elements for 1000 bright, sun-like FGK main sequence stars. This represents an order of magnitude increase in the number of stars with P measurements and enables a robust statistical understanding of the habitability of the solar neighborhood from the perspective of these elements.