Stryker hires Dom Cobb, Eames, and the rest of the gang to plant an idea in the professor's head. Resilient... highly contagious. Like a parasite, a bacteria, a virus. An idea that once fully formed - fully understood, will take hold of the brain and become almost impossible to eradicate...
An idea to kill all the mutants with Cerebro.
So in the dungeons of Alkali Lake Stryker forcibly puts Charles under, then calls in the team to hook him up.
Can they do it? And if the Professor figures out his mind is being infiltrated, what are the consequences for the Inceptors?
Well, Mastermind was just creating illusions in X's mind. This was while X's powers were disabled. Even then there were moments in which he could snap back to reality.
As Placidity has already pointed out Xavier was restrained during Masterminds initial assault so that Xavier couldn't fight back with anything but his will. When both of them was in the other Cerebro Mastermind was entirely incapable of affecting Xavier.
The Inception Team will get their asses handed to them in a quite spectacular fashion. Lets recall that they actually can have problems performing said feat against a regular human, Xaviers brain is leap and bounds above that.