The 22-year-old Varder forward will initially move to the Scottish Premier League side on loan before joining the club on a permanent three-year deal next season.
Mato has been in fine form for the North Macedonian side this term, scoring 15 goals and contributing two assists in 17 appearances.
He could make his Hearts debut at Dundee United on Saturday.
McInnes said on BBC Sport: "It's great work from the club to get Rogers in during this window and I'm really pleased that he's here and ready to go.
"He's a livewire player, always looking to attack and cause the opposing defence problems.
"He's been in to meet the boys and has made a good first impression, and we're all looking forward to working with him."
Mato was recently in action for Uganda at the Africa Cup of Nations and has eight international goals in 41 matches.
He arrives at Hearts as Scotland striker Lawrence Shankland is ruled out until March with a hamstring strain.