We develop a general framework for multifunctional agriculture, which includes not only public goods but also rural viability as a non-public good item. We contribute to the literature in two ways. First, we demonstrate how the broader definition of multifunctional agriculture differs from the agri-environmental multifunctionality, and how agri-environmental policy should be reformed to include these aspects. We show that rural viability entails adjusting fertilizer tax and buffer strip subsidy below their first-best Pigouvian levels to reflect the direct and indirect employment effects of agricultural production. Moreover, we show that when non-agricultural land use is present, an additional, non-agricultural instrument is needed to adjust the amount of land allocated to agriculture to its optimal level. In a parametric model calibrated to Finnish agricultural conditions and Finnish valuation of agri-environmental amenities and rural viability, we assess how the socially optimal provision of non-public good multifunctionality relates the socially optimal agri-environmental multifunctionality.