We present a homotopy theory for a weak version of modular operads whose compositions and contractions are only defined up to homotopy. This homotopy theory takes the form of a Quillen model structure on the collection of simplicial presheaves for a certain category of undirected graphs. This new category of undirected graphs, denoted U, plays a similar role for modular operads that the dendroidal category Ω plays for operads. We carefully study properties of U, including the existence of certain factorization systems. Related structures, such as cyclic operads and stable modular operads, can be similarly treated using categories derived from U.A modular operad, as introduced by Getzler and Kapranov [GK98], is a kind of cyclic operad equipped with self-compositions of operations. That is, it is an algebraic structure consisting of a sequence of sets P (n), indexed on nonnegative integers n, together with families of 'composition operations' P (n) × P (m) → P (n + m − 2) and 'contraction operations' P (n) → P (n − 2). The canonical example is when P (n) is the moduli space of Riemann surfaces with n marked points. This paper, along with its companion [HRY], center around a new category of graphs that permit a Segalic approach to the study of modular operads.The main goal of the present paper is to propose a precise definition for upto-homotopy modular operads and provide a homotopy theory for such objects. Why might one pursue such a program? One motivation comes from the work of Mann and Robalo who show, by passing to correspondences in derived stacks, that the operad of stable curves of genus zero acts on any smooth projective complex variety (see [MR18, Theorem 1.1.2]). This allows them to construct (genus zero) Gromov-Witten invariants on the derived category of the variety in question. We anticipate this work will be used in the study of higher genus version of that result; see Remark 1.2.1 of [MR18], which is prefigured in the ordinary case in [Bar07, 11.2].An additional motivation comes from work of the second author with Horel and Boavida de Brito on subgroups of the profinite Grothendieck-Teichmüller group. They conjecture that the homotopy automorphisms of a profinite completion of Getzler-Kapronov's modular operad M