Well, first of all, the story has to be engaging on its own. For example, in 'Date A Live', the story of saving the world by dating spirits is really interesting. The fanservice comes in the form of the cute and often scantily - clad female spirits. It's like they use the fanservice as an extra attraction while the story keeps you hooked.
Well, in terms of story, a good fanservice anime often has an engaging plot. For example, in 'High School DxD', the plot of the main character's journey in the devil world and his growth in power makes it interesting. The fan - service aspect can add a certain charm, like the character designs which can be appealing. In 'Kill la Kill', the fan - service is part of the unique style of the anime, and the story's themes of revenge and overthrowing the oppressive system are great.
'Date A Live' is also a great example. It features fan - service with the female spirit characters. However, the story is engaging. The main character, Shido Itsuka, has to date the spirits in order to seal their powers and save the world. There are mysteries about the origin of the spirits, and the relationships that develop between Shido and the spirits are both heart - warming and full of drama.
Another great one is 'Kill la Kill'. The story is about a girl named Ryuko Matoi seeking revenge against her father's killer while uncovering the secrets of her school. The anime has a very distinct art style and there are elements of fanservice in the form of the rather unique and sometimes revealing outfits of the characters. It's a wild and exciting ride with a solid story.