But the 30-time Tour de France stage winner opted not to take part in the sprint finish on stage one and finished 10th.
Ireland's Sam Bennett won the 159.4km stage, which went from Koper to Kocevje in Slovenia.
"Coming back from illness, I'm as fit as I can be after four weeks of training," the 32-year-old said.
Cavendish has not competed for Team Dimension Data since the Milan San-Remo one-day race in March.
He was then diagnosed with glandular fever, caused by the Epstein-Barr virus, in April.
"It has been really difficult because I have had to monitor what I have been doing very closely," Cavendish added.
"It's not like you wake up one morning and you're feeling better, you have to take it step by step. Even this week in the race, I'll be monitoring the workload."
The four-day race finishes on Sunday and Cavendish is looking to prove his fitness ahead of the Tour de France, which starts on 1 July.
Before that, Cavendish is scheduled to race in the British Championships on the Isle of Man on 25 June.
Britain's Mark Cavendish has returned to racing after three months out with illness in the Tour of Slovenia.