Inclusive cross sections for pion production in $pp$ collisions are calculated for the first time fully based on unintegrated gluon, quark and antiquark distributions (uPDF). We use recently developed Kwieci\'nski uPDF's and different phenomenological fragmentation functions (FF) from the literature. In addition to the $gg \to g$ diagram we include also $g q \to q$ and $q g \to q$ diagrams for inclusive parton production. The cross section for pions is obtained then by convoluting the inclusive parton distributions and FFs. Applications for SPS and RHIC are shown.