Coffee beans are edible and are safe to eat.
You can either cook the coffee beans and eat them or you could eat the coffee beans raw.
Eating the coffee beans raw may be hard to do so you might want to cook the coffee beans to make them easier to chew, digest etc.
Just don't eat too many coffee beans because when coffee beans are eaten in excess it can cause health issues because your caffeine intake would be too much.
Too much caffeine can be bad for you but in moderation it's okay.
The coffee beans are loaded with antioxidants as well so they can help keep you healthy as well as boost your energy.