The in-situ preparation of three-dimensional MOF-199 for use in fiber based solid-phase microextraction (SPME) is presented in the current study. First, a highly porous copper foam was prepared on the surface of an unbreakable copper wire by an electrochemical method. Then, the substrate was in-situ converted to MOF- 199. Successful synthesis of the sorbent was confirmed by various characterization such as SEM, EDX and BET methods. The prepared fiber was used for direct SPME of different antibiotics such as amoxicillin, azithromycin, ciprofloxacin, cefixime and gentamicin from urine samples. The extracted analytes were then desorbed by liquid desorption method. To obtain the maximum extraction efficiency, different experimental parameters including pH, ionic strength, stirring rate, extraction time, desorption volume and desorption times were optimized. Under the obtained optimum condition, the linearity of method was in the range of 1-50 μg L-1. Finally, the accuracy of the method was investigated by analyzing different biological samples such as urine.