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

3$\begingroup$ Are you hoping to avoid sweating over barycentric subdivision of singular chains, or just to disguise the sweat? [Presumably any proof has to show somehow that chains are local.] $\endgroup$– Tim PerutzCommented May 1, 2010 at 13:51

14$\begingroup$ As pointed out in the "derivation" section of the wikipedia page en.wikipedia.org/wiki/Mayer%E2%80%93Vietoris_sequence, MayerVietoris may be derived from the EilenbergSteenrod axioms and the long exact sequence. Since it is independent of the dimension axiom, it applies to extraordinary homology theories, such as Ktheory. $\endgroup$– Ian AgolCommented May 1, 2010 at 14:51

1$\begingroup$ In my limited experience, I don't think I've seen how to do this, but I've always wanted to think of the MV spectral sequence where the open cover is a resolution/(co)fibrant replacement of the space to which you then apply the cohomology functor. I think I ran across this notion somewhere, once upon a time, but I could be misremembering. Can this be made sense of? $\endgroup$– Aaron BergmanCommented May 1, 2010 at 19:20

33$\begingroup$ I'm in a slightly cranky mood, so I feel like objecting to the title of your question. There is a big difference between viewing something in a mathematically mature way and viewing something in a fancy abstract framework! I'm a reasonably mathematically mature guy, and I think of MV as a generalization of the inclusion/exclusion principle for counting elements of a set (exercise : write out the MV ex seq for X a finite set w/ the discrete topology and U,V subsets with X=U \cup V. Interpret it as the inclusion/exclusion principle). As Agol said, though, the proof just uses the ES axioms. $\endgroup$– Andy PutmanCommented May 2, 2010 at 18:43
5 Answers
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).

4$\begingroup$ Amazing! This forum lets you tap into the accumulated insights of such talented people. I'm hooked. Thanks Angelo, and thanks Tilman  I'm not familiar with "homotopy colimits" but I'll look some things up on it on the web. $\endgroup$ Commented May 1, 2010 at 15:45

17$\begingroup$ Thanks. I don't know about talented; it's just that I have been around for a fairly long time. $\endgroup$– AngeloCommented May 1, 2010 at 16:48
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.

$\begingroup$ This probably works only for numerable coverings (i.e. ones with a subordinate partition of unity) since, as far as I know, only those define homotopy colimit diagrams. By the way: Does this work for arbitrary homology theories? $\endgroup$ Commented Jan 20, 2014 at 14:28

$\begingroup$ @LennartMeier a reference is Dugger's Primer on Homotopy Colimits, section 15, though he doesn't mention convergence issues. $\endgroup$ Commented Feb 2, 2016 at 10:14
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).$$

1$\begingroup$ This works for finite closed covers, not for open covers. $\endgroup$– AngeloCommented May 1, 2010 at 13:52

8$\begingroup$ I believe that this does work, except that I think you want to use the extension by zero
$j! \mathbb{Z}$
rather than the pushforward, and the exact sequence of sheaves goes in the opposite direction  you get the spectral sequence by applying Hom from this to the desired sheaf. $\endgroup$ Commented May 1, 2010 at 16:08 
2$\begingroup$ The cohomology of $j! \mathbb{Z}$ is not the cohomology of the open subset. If $X$ is compact, it is the cohomology with compact support; in this way you can get MayerVietoris for BorelMoore homology. $\endgroup$– AngeloCommented May 1, 2010 at 16:33

2$\begingroup$ Sorry, are you saying
$Ext(j_! \mathbb{Z},F)$
is not the cohomology of F restricted to the open subset? $\endgroup$ Commented May 1, 2010 at 17:27 
6$\begingroup$ I am sorry, I misunderstood what you were saying. You are absolutely right, you can also get MayerVietoris this way. I had never thought of this. $\endgroup$– AngeloCommented May 1, 2010 at 21:26
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.
There is a Mayer Vietoris sequence for any sheaf theory (and so for $\ell$ adic cohomology, de Rham cohomology, singular cohomology, $p$ adic,... ).
If $i:Z\hookrightarrow X$ is a closed embedding and $j:U\hookrightarrow X$ its complementary open embedding, there is the distinguished triangle/(co)fibre sequence of sheaves (of $\ell$ adic, holonomic $\mathcal{D}$ modules, constructible sheaves,... ) $$i_*i^!k_X \ \to \ k_X \ \to \ j_*j^!k_X \ \stackrel{+1}{\to}$$ Taking its long exact sequence on cohomology (=pushing forward to a point) gives the Mayer Vietoris sequence, at least something probably quasiisomorphic to it (for the open cover given by $U$ and a tubular neighbourhood of $Z$).