If caffeine is an alkaloid, why is coffee acidic?
Coffee contains hundreds, if not thousands, of other compounds in addition to caffeine.  Included among these other compounds are many acids.  Many small, organic acids such as  citric, malic, lactic, pyruvic and acetic acid are present, but both quinic acid and chlorogenic acid (and their derivatives) are usually present in even higher concentration.  Phosphoric acid, an inorganic acid, is also present. The exact concentration of these various acids depends upon processing variables such as roast conditions and grind size.  Here is a link to an interesting, one-page discussion of the subject.
quinic acid

chlorogenic acid

Edit: In Season 3, episode 6 of &quot;Breaking Bad&quot;, we meet Walt's new lab assistant Gale, who is brewing coffee using a lab glassware set-up.  Walt says that it is the best coffee he has ever tasted and Gale responds by mentioning &quot;quinic acid&quot; as something to be considered in brewing great coffee.