By which I mean, following Bôrger's paper *Coproducts and Ultrafilters*, the terminal monad among those that preserve finite coproducts, if such a thing can be constructed.


So far, what I have is, given a (small) category $\mathscr{C}$, define the category $\beta\mathscr{C}$ by first letting its objects be ultrafilters on $\text{Ob}\mathscr{C}$ and letting its morphisms be ultrafilters on $\text{Mor}\mathscr{C}$.


We let the source and target of a given ultrafilter of morphisms $\mathfrak{f}$ be, respectively, $$\mathfrak{X}=\{X\subseteq\text{Ob}\mathscr{C}\mid s^{-1}[X]∈\mathfrak{f}\}$$ and $$\mathfrak{Y}=\{Y\subseteq\text{Ob}\mathscr{C}\mid t^{-1}[Y]∈\mathfrak{f}\},$$ where $s$ and $t$ are the source and target maps, and letting the identity on a given ultrafilter of objects $\mathfrak{X}$ be $$\mathfrak{id}\_\mathfrak{X}=\{F\subseteq\text{Mor}\mathscr{C}\mid i^{-1}[F]\in\mathfrak{X}\}$$
where $i$ is the map that sends objects to the identity morphisms on them.


Now, given two ultrafilters of morphisms $\mathfrak{f}:\mathfrak{X}\rightarrow\mathfrak{Y}$ and $\mathfrak{g}:\mathfrak{Y}\rightarrow\mathfrak{Z}$, we have that for any $F\in\mathfrak{f}$ and $G\in\mathfrak{g}$, both $t(F)$ and $s(G)$ are elements of $\mathfrak{Y}$, since $F⊆t^{-1}(t(F))$ and $G⊆s^{-1}(s(G))$ imply that $t^{-1}(t(F))\in $ and $s^{-1}(s(G))∈$, right.


Thus, fairly straightforwardly, if we define a composite $∘$ by 
$$∘ = \{ H ⊆ \text{Mor}\mathscr{C} \mid ∃ F ∈ , G ∈ : ∀ f∈F, g∈G, ~~s(g)=t(f) \Rightarrow g∘f∈H\},$$
the result we get is at least a proper filter.


I get stuck, however, in trying to show that $\frak{g}\circ\frak{f}$ is actually still an ultrafilter.


It certainly is when $$ and $$ are principal? But, I'm having trouble here.


If this does work I think the proof in that paper should lift fairly painlessly to showing that this monad is also terminal among coproduct preserving monads.



Trying to construct the ultrafilter 2-monad on $\mathbf{Cat}$
Your $\mathfrak g\circ\mathfrak f$ looks as if it will be an ultrafilter if at least one of the factors $\mathfrak f$ and $\mathfrak g$ is principal, or more generally if, for some cardinal $\kappa$, one of the factors contains a set of cardinality $\kappa$ while the other is closed under intersections of $\kappa$ sets at a time. But it won't be an ultrafilter in general, not even if $\mathfrak X=\mathfrak Y=\mathfrak Z=$ the additive monoid of natural numbers (viewed as a one-object category). 


For this and (lots) more information about adding ultrafilters on $\mathbb N$ (and generalizations), the standard reference is the book "Algebra in the Stone-Čech compactification" by Neil Hindman and Dona Strauss. In a combination of the book's notation and yours, both $\mathfrak f+\mathfrak g$ and $\mathfrak g+\mathfrak f$ are ultrafilters extending $\mathfrak g\circ\mathfrak f$, and they are not always the same ultrafilter by [Theorem 4.27](https://books.google.com/books?id=mjmPHAhJkmYC&pg=PA96).


