Open MIDI Preferences, by clicking Logic Pro in the menu bar, then Preferences -> MIDI. Make sure that under Inputs, your MTC MIDI source port is activated
Open the Synchronization settings by clicking File in the menu bar, then Project Settings -> Synchronization
Under General, set the Sync Mode to MTC (or leave it at internal if you activate the check box underneath). Set the Frame Rate as desired, and choose wheter you want to have the Auto detect format of MTC activated
Make sure Plays SMPTE is set to all zeros. If left at the default, the timecode will be all over the place