Having spent a good part of Shabbat with the Rambam, jumping from the Sefer Ha-Mitzvot to the Yad to the Moreh, a clearer picture of his attitude toward magic and divination. The desire to do this was motivated by the discussion that emerged between myself and an anonymous friend over a recent post. Here's what I've come up with. First, the 'Mar'eh Mekomos':
Yad Hilchot A"Z 11:4-16
Yad Hilchot Yesodei HaTorah 10:3
Sh"M Lavin 31 & 32
Moreh II:37, III:29 (toward the beginning), III:37 (beginning)
There's a distinct group of sources (Yad YHT, SH"M 31, and Moreh II:37) which grant at least some credence to 'kosem', i.e., divination or fortune-telling. It's this type of behavior which must be distinguished from prophecy, which is thecentral theme of both the Yad and MOrah sources here. In the Yad, the distinction is whether the fortune-teller is correct 100% of the time or not. In the Moreh, Rambam derscribes the theoretical underpinnings of the differences. He writes that prophecy comes to a person who has perfected both the rational faculty and the imaginative faculty. Wisdom is for one who has the former and not the latter. If one has a strong imaginative faculty (which the Rambam says can only be developed from 'raw material' which you've either got or don't have) but hasn't developed the rational faculty, he will be a fortune-teller, prestidigitator, or a politician. However, even though they may apprehend something from a higher source, their intellects won't be able to truly understand what they see, so they end up with confused and garbled ideas. Thus, it's fair to say that 'kosmim' have acheived a 'partial truth'.
Other forms of magic and witchcraft, such as kishuf, chover chever, ov, yidoni, and necromancy, the Rambam believes are pure charlatanism. He states explcitly in the Moreh that anyone who participates in it is either a dupe or a charlatan. He believes that it all stems from an idolatrous worldview, but not even a necessary extension. Nowhere does the Rambam say that this stuff is anything but illusion designed to maintain control over the igniorant masses.
In fact (this is in Moreh III:29, and check out Kapach's footnote #46 if you have that edition), Rambam seems to be suggesting that the ONLY reasoon that the Torah explicitly forbids all of these things is because they are connected to idolatry, and the Torah tries to uproot any practice associated with idolatry. Otherwise, the Torah never would have had to forbid them because they're so self-evidently silly.
Going back to the Yad that we started with (A"Z 11:16), the Rambam relates to those practices which are simply charlatanism. Is the exceptional case of 'koseim' (and some forms of 'me'onein') included in this? It's hard to know exactly how far back it goes whn the Rambam writes 've-chol ha-devarim ha-eleh' at the beginning of 11:16. But from elsewhere it seems that he's referring specifically to those behaviors which have no efficacy at all. After describing all of the forbidden acts, all of which come under the rubric of things that are forbidden because they are associated with idolatry (see the beginning of that chapter, which describes practices which are forbidden because of 'chukoteihem'; these things are an extension of that category), the Rambam makes it clear that the prohibition doesn't imply that there's efficacy to these things, just that the Torah forbids them anyweay, for whatever reason. Rather, he forcefully states that there's no efficacy to these things whatsoever, and that it's unbecoming for a Jew to believe in them. He explains that to be the purpose of the verse 'Tamim Tihiyeh', which is juxtaposed with these prohibitions to say that even though these things are specifically forbidden, it's not because they actually work. Rather, one ought to strive for the wholeness of mind that would lead him to the right conclusion. namely, that this stuff is meaningless charlatanism.
Thus, while not specifically a Mitzvah, the Rambam understands it as a rejoinder to keep a critical eye and not fall prey to nonsensical notions.
I hope this clarifies the apparent contradiction between the various sources in the Rambam and the consequent confusion surrounding his deployment of the passuk of 'Tamim Tihiyeh'.