Most of the acidity in coffee is removed during brewing. Spent coffee grounds are only very slightly acidic (depending on the water used to brew) to neutral. Grounds contain more nitrogen than phosphorous or potassium, as well as some minerals. For composting, the grounds would actually be considered a "green" material due to the nitrogen content.
It is popular in composting and vermiculture and seems to be a preferred food of earthworms. You can add spent coffee grounds to compost along with other green materials such as grass clippings, kitchen wastes, and brown materials like autumn leaves, shredded newspaper, sphanum-peat, wood chips\shavings and small twigs, etc.