I study a self-enforcing mechanism for an international organization that interacts repeatedly over time. A random shock determines which countries would be in favor of or against taking a collective action. Thus, if the organization wants to take the action, incentives must be provided. I show that the optimal stationary equilibrium is equivalent to a mechanism characterized by voting weights. I study how this optimal mechanism depends on the discount factor. In particular, I show that within a class of parameter cases, the optimal mechanism mimics the way voting power is distributed among UN members via Security Council seats.