Yes! It's best to use ground coffee though as coffee is rich on nitrogen, potassium, iron, calcium, phosphorus, chromium, and magnesium, which are all enormously beneficial for your soil's health.