When it comes to mitzvot in general, there is a machloket whether they require kavvanah (Rosh Hashanah 28a, Berakhot 13a). Even if one assumes that they do not require kavvanah, Tosafot (Sukkah 39a) and the Ra'ah (cited by the Ran in Rosh Hashanah 28b) hold that if one has kavvanah not to perform the mitzvah, one is not yotzei.
However, these sources are discussing one who has intent not to fulfill his obligation. In your case, I don't know if there is intent not to fulfill the mitzvah, or just not much interest in doing it. In a case where someone prays out of pressure to conform, that would presumably not be negative kavvanah. In the case of one who disagrees with the words he is saying, perhaps he can disagree but still intend to fulfill an obligation. In any case, if he does not believe in God, the Ramban says such a person cannot perform any mitzvah (introduction to commentary on Iyyov).
(Certain parts of tefillah do require positive kavvanah: For the first pasuk of keriat shema, and the first berakha of shmoneh esreih, one must have kavvanah in order to be yotzei. What that kavvanah consists of is a separate discussion.)