The SS Beagle, commanded by Captain R.M. Merik, was a vessel operated by the Merchant Service. Merik joined the Service after dropping out of Starfleet Academy during his fifth year. (TOS: "Bread and Circuses")
Carstairs, of the USS Enterprise, formerly served on a Merchant Marine freighter in the Canopus region. His ship had at one time visited Alpha Carinae II to conduct a geology survey of the planet for a mining company. (TOS: "The Ultimate Computer")
Since the references to this Service have been rather vague, it is unclear what capacity they serve in the Federation. They could possibly be attached to Starfleet, or they could have been formed out of the Earth Cargo Service following the formation of the Federation in the mid-22nd century.
Although nothing is known of the prefix "FMS", as was used on the FMS Geldonero, but one may speculate that it means "Federation Merchant Ship (Starship)", possibly meaning that it belongs to the Merchant Service.