Mo. Rev. Stat. § 552.080
1. Notwithstanding any other provisions of law, the court in which the proceedings are pending shall, upon application and approval, order the payment of or tax as costs the following expenses and fees, which in each case shall be reasonable, and so found by the court:
(2) The expenses of conveying any prisoner from a jail to a facility of the department of mental health and the expense of returning him to a jail under the provisions of section 552.020, 552.030, 552.040 or 552.050.
Such expenses and fees shall be paid, no matter how taxed as costs or collected, by the state, county or defendant, when liable for such costs under the provisions of chapter 550. Such order may be made at any time before or after the final disposition of the case and whether or not the accused is convicted or sentenced to the custody of the division of corrections or county jail, as the case may be, or placed upon probation or granted parole.
3. If a person is ordered held or hospitalized by the director of the department of mental health or in one of the facilities of the department of mental health pursuant to the following provisions, the liability for hospitalization shall be paid by the person, his estate or those responsible for his support in accordance with chapter 630:
(L. 1963 p. 674 § 8, A.L. 1969 p. 572, A.L. 1971 S.B. 163, A.L. 1980 H.B. 1724, A.L. 2023 S.B. 106)