It seems bonkers to go to Kyle and head straight back - but that's just my opinion!
There is a "local" easement that permits tickets that are valid from Edinburgh to Kyle to be used to return from Mallaig.
There is a bus - the most scenic in the country - that runs from Kyle to Armadale, this connects with the ferry (in Summer at least, not sure about winter - possibly not) that in turn connects with the train from Mallaig that connects with the sleeper.
The best time of year for this - by far - is May/June.
I would highly recommend this round trip journey!
If you do just want to go to Kyle and back, then at least go on an
SRPS railtour

(
Scotsman is a steward for SRPS and could provide any more information you want)
--- old post above --- --- new post below ---
Yes, it also acts as a school bus, I think it may not run through to Armadale in winter though, but in Summer it provides a service for schoolkids, locals and tourists.
When several members of this forum went a few years ago, it was quite an interesting journey. Firstly, the machine broke so the journey was free. Secondly, when we boarded there were no seats together, so we paused for a moment, and the people on the bus (mostly youngsters) encouraged us to sit down among them. I've never quite seen anything like that on a bus before. Thirdly, a lad accidentally spilt something while exiting from the bus, and the driver got a broom, handed it to the lad who swept away the mess onto the road. The scenery was incredible. I have to rate it as the most amazing - and bizarre - bus journey ever. It would be
madness to get all the way to Kyle and not get on that bus (even if you hate buses) IMO.
I would also recommend the Fish & Chip restaurant in Mallaig, but unfortunately I don't think there's time to do that between the ferry arriving and the train departing.