This question is short but to the point: what is the "right" abstract framework where MayerVietoris is just a trivial consequence?

The MayerVietoris sequence is an upshot of the relationship between sheaf cohomology and presheaf cohomology (a.k.a. Cech cohomology). Let $X$ be a topological space (or any topos), $\mathcal U$ a covering of $X$. Let $\mathop{\rm Sh}X$ be the category of sheaves on $X$ and $\mathop{\rm PreSh}X$ the category of presheaves. The embedding $\mathop{\rm Sh}X \subseteq \mathop{\rm PreSh}X$ is leftexact; its derived functors send a sheaf $F$ into the presheaves $U \mapsto \mathrm H^i(U, F)$. For any presheaf $P$, one can define Cech cohomology $\mathrm {\check H}^i(\mathcal U, P)$ of $P$ by the usual formulas (this is often done only for sheaves, but scrutinizing the definition, one sees that the sheaf condition is never used). One shows that the $\mathrm {\check H}^i(\mathcal U, )$ are the derived funtors of $\mathrm {\check H}^0(\mathcal U, )$; and of course for a sheaf $F$, $\mathrm {\check H}^0(\mathcal U, F)$ coincides with $\mathrm H^0(\mathcal U, F)$. The Grothendieck spectral sequence of this composition, in the case of a covering with two elements, gives the MayerVietoris sequence. There is also a spectral sequence for finite closed covers, which is obtained as in anonymous's answer. I guess that this can also be interpreted as Tilman does, in a different language (I am not a topologist). 


This answer is related to Tilman's: Let $U$ and $V$ be the open sets covering $X$. For $S$ an open subset of $X$, let $\mathbb{Z}_S$ be the pushforward to $X$ of the sheaf of locally constant integer valued functions on $S$. Then we have a short exact sequence of sheaves $$0 \to \mathbb{Z}_X \to \mathbb{Z}_U \oplus \mathbb{Z}_V \to \mathbb{Z}_{U \cap V} \to 0$$ and the corresponding long exact sequence is the MayerVietores sequence in cohomology. This answer can be generalized easily to any open cover of $X$: you have a long exact sequence of sheaves: $$0 \to \mathbb{Z}_X \to \bigoplus \mathbb{Z}_{U_i} \to \bigoplus \mathbb{Z}_{U_i \cap U_j} \to \cdots$$ which gives a spectral sequence $$\bigoplus H^p(U_{i_1} \cap U_{i_2} \cap \cdots U_{i_q}) \to H^{p+q}(X).$$ 


Maybe you're looking for the MayerVietoris spectral sequence, the homology spectral sequence for a homotopy colimit? The MVsequence is a twoline spectral sequence, thus an exact sequence. The general form is $$ E^2_{p,q} = colim_p H_q(X_\bullet) \Rightarrow H_{p+q}(hocolim X_\bullet) $$ You can think of this as a composite functor spectral sequence. 


Here's an answer somewhat different from those already given. Associated to any homotopy pullback square, there's a long exact sequence of homotopy groups often called the MayerVietoris sequence. It comes from weaving together the long exact sequences for, say, the two vertical maps in the square, which have homotopy equivalent homotopy fibers. (This weaving is a standard homological algebra exercise, and appears somewhere in Hatcher's book...) Now, to build the MayerVietoris sequence in cohomology for a CW complex X written as a union of subcomplexes $X = A\cup B$, just note that the homotopy pushout square formed by $A\cap B$, A, B, and X becomes a homotopy pullback square after applying Map(, K(G, n)), where G is the coefficient group you're using. The MayerVietoris homotopy sequence is now precisely the MV sequence in cohomology. (Annoyingly, for a fixed value of n this only gives you some of the sequence.) It would be interesting to see a variant of this for homology, maybe using the infinite symmetric product? I suppose the place to look would be the book by AguilarGitlerPrieto, where homology is introduced entirely in terms of symmetric products. The relevant bit seems to be missing from the Google preview. 

