James does not say that works are necessary for salvation. Where do you get that from? Our sinful works are erased by God's grace, and then we are called to replaced them with His works - His works prepared for us to do in furtherance of the Gospel so that others might be saved. Those works he has had in store for Believers since God only knows when. and are separate from our own ideas. Somewhere in Matthew it says, "Repent and show your sincerity by bringing forth fruit indicative of being truly repentant. Two completely different work dynamics.
In my essays I try to point out that there are no conflicting verses in the Bible. The conflicts arise in our own misconceptions and misunderstandings of
God, Jesus, and the Bible.