Anthropomorphic phantoms are critical in computed tomography (CT) imaging, simulating human anatomy for image quality and dosimetry evaluation. Traditional phantoms, however, often fail to accurately replicate complex tissue patterns, particularly for advanced technologies like spectral photon-counting CT (SPCCT). This study introduces a framework for creating 3D-printed anthropomorphic phantoms optimized for SPCCT, beginning with a breast phantom. An in-house optimization algorithm was developed to generate an optimal image acquisition protocol, capable of distinguishing between adipose, fibroglandular, skin, and carcinoma tissues. Using the Mars Microlab 5×120 SPCCT system, it was found that a tube voltage of 80 kVp and narrow energy bins 7-27 keV, 27-32 keV, 32-37 keV, 37-42 keV, and 42-80 keV, offered superior results. Various photopolymerizable resins and thermoplastic filaments were tested as tissue-mimicking materials (TMMs), comparing their linear attenuation coefficients with those of the tissues and reference TMMs. The breast phantom was created by segmenting an MRI image from the Duke Breast Cancer MRI dataset into two models: one for skin, fibroglandular, and carcinoma tissues, 3D-printed with e-PLA resin, and another for adipose tissue, replicated using paraffin wax. Multi-energy images of the phantom were then evaluated using both narrow and wide energy bins for validation. While this study focused on a breast phantom, the framework can be applied to create various anthropomorphic phantoms, enhancing SPCCT imaging and potentially improving diagnostic accuracy and patient outcomes.