Every social group needs to decide when to provide public goods and how to allocate the costs among its members. Ideally, this decision would maximize the group's net benefits while also ensuring that every individual's benefit is greater than the cost he or she has to pay. Unfortunately, the economic theory of mechanism design has shown that this ideal solution is not feasible when the group leadership does not know the values of the individual group members for the public good. We show that this impossibility result can be overcome in laboratory settings by combining technologies for obtaining neural measures of value (functional magnetic resonance imaging-based pattern classification) with carefully designed institutions that allocate costs based on both reported and neurally measured values.