Not always, unless you permit metagaming at the table.
Most of the time, the character using Mage Slayer will see the effects of the spell, and this will be adequate for using their reaction granted by the feat.
Obviously, the issue comes down to when the effects of the spell are not obvious. Thankfully, the Player's Handbook and Xanathar's Guide to Everything have some guidance here.
First, from Xanathar's Guide, the section entitled Perceiving a Caster at Work:
If the need for a spell’s components has been removed by a special ability, such as the sorcerer’s Subtle Spell feature or the Innate Spellcasting trait possessed by many creatures, the casting of the spell is imperceptible. If an imperceptible casting produces a perceptible effect, it’s normally impossible to determine who cast the spell in the absence of other evidence.
So in the case of the Mind Flayer, there are no spell components to perceive, so at least the casting of the spell is imperceptible. Next, the Player's Handbok in the section entitled Targets says:
Unless a spell has a perceptible effect, a creature might not know it was targeted by a spell at all. An effect like crackling lightning is obvious, but a more subtle effect, such as an attempt to read a creature's thoughts, typically goes unnoticed, unless a spell says otherwise.
If the spell being cast by the Mind Flayer has an imperceptible effect, taken together with the fact that there are no components required, the casting of the spell and its effects should be entirely unknown to everyone watching. In this situation, your fighter's character should have no idea a spell was cast.
Which brings me to the crux of this answer: metagaming.
Mage Slayer says:
When a creature within 5 feet of you casts a spell, you can use your reaction to make a melee weapon attack against that creature.
In the RAWest of RAW interpretations, technically your fighter should be able to use their reaction to make an attack, even if the spell's casting and effects are totally imperceptible. But being able to do this requires relying on player knowledge, knowledge the character should not possess. The character has no idea a spell was cast. The state of affairs, from the perspective of the fighter, is entirely identical, whether or not the Mind Flayer casts this entirely imperceptible spell.
So it comes down to the DM ruling: do you allow the character to take advantage of knowledge that only the player possesses? It's up to you. I would rule that the character cannot use their reaction when the casting and effects of the spell are entirely unknown to the them.