The Syllabus for Mechanical Engineering as an optional paper in the Civil Serviceds Mains examination is here ; https://www.civilserviceindia.com/subject/Mechanical-Engineering/main-syllabus.html
Please go through the entire syllabus carefully to build a sound strategy for its preparation. The syllabus includes various components and you need to do intensive reading for preparing this paper.
As you know the marks of the optional paper is crucial to decide your ranking in final list, you to have to perform exceptionally well in the paper of your choice.
Since the rest of the papers are compulsory for all, its only the optional paper that can make or break your fortune. So dont try to do selective reading and gamble, as there is only one optional paper now.
The right strategy should be to go through each section of the syllabus and pick up the books and read them carefully. First pick up lighter books to clear your concepts and then go on to read the advance books.
Cover the entire syllabus and after reading each segment make notes of them simaltaniously. Rember that your notes will be the final course material for reading and revising in future. So take your time and do a good job with it.
Go ahead and start your preparation with books listed here. If any section of the syllabus is not covered in these books, you can look for other suggestive readings.
Books On Mechanical Engineering for IAS Exam