any chance it got wet lately?
Quite a few times I have seen a Jeep run rough, it has gotten wet recently and the Throttle Position Sensor got wet, and caused problems. That said its about $70, so hopefully someone chimes in with another answer that may cost less. Rough just at idle tho may not be the TPS.
Does the key on-off-on-off-leave on trick work on a 96, my 97 has that featuer but I am not sure the years it is specific too.