TITLE: Toposes (topoi) as classifying toposes of groupoids
QUESTION [22 upvotes]: A famous theorem of Joyal and Tierney says that each Grothendieck topos is equivalent to the classifying topos of a localic groupoid. I believe that Butz and Moerdijk have shown that if the topos has enough points then one can use a topological groupoid.
I am not a category theorist and I have trouble following the proof in Johnstone's Elephant. I was wondering if someone can explain what is going on for the specific case of presheaves on a monoid. This is a very special kind of topos with enough points and so I am hoping somebody can describe a groupoid explicitly. 
If the monoid is cancellative, the topos is an etendue and I know how to get an etale groupoid via inverse semigroup theory so I am interested in the non-cancellative case. 
Motivation: I study monoids and so it is interesting to try and understand how a Morita class of groupoids can be associated to a monoid.

REPLY [10 votes]: Perhaps these slides will be helpful. I'll try to explain what happens in your special case.
Let $M$ be a monoid and let $\mathcal{B} M$ be the topos of right $M$-sets. The points of $\mathcal{B} M$ are the left $M$-sets $P$ that satisfy the following conditions:

$P$ is inhabited.
Given elements $p_0$ and $p_1$ of $P$, there exist an element $p$ of $P$ and elements $m_0$ and $m_1$ of $M$ such that $m_0 \cdot p = p_0$ and $m_1 \cdot p = p_1$.
Given an element $p$ of $P$ and elements $m_0$ and $m_1$ of $M$ such that $m_0 \cdot p = m_1 \cdot p$, there exist an element $p'$ of $P$ and an element $m'$ of $M$ such that $m' \cdot p' = p$ and $m_0 m' = m_1 m'$.

For example, the left regular action of $M$ on itself is a point of $\mathcal{B} M$, and as it happens, this point covers all of $\mathcal{B} M$. However, what we need to find is an open cover of $\mathcal{B} M$. The Butz–Moerdijk construction yields such a thing. 
Let $K$ be a fixed set of cardinality $\ge \left| M \right|$. An enumeration of $M$ is a partial surjection $K \rightharpoonup M$ with infinite fibres. An isomorphism of enumerations of $M$ is an isomorphism of left $M$-sets making the following diagram commute:
$$\require{AMScd}
\begin{CD}
K @= K \\
@VVV @VVV \\
M @>>> M
\end{CD}$$
Choose a representative in each isomorphism class of enumerations of $M$. We define a groupoid $\mathbb{G}$ as follows:

The objects are the chosen representatives.
The morphisms $\alpha \to \beta$ are tuples $(\alpha, \beta, m)$ where $m$ is an invertible element of $M$. (We do not require any compatibility with the partial surjections here.)
Composition is given by $(\beta, \gamma, m) \circ (\alpha, \beta, n) = (\alpha, \gamma, m n)$.

Write $G_0$ (resp. $G_1$) for the set of objects (resp. morphisms) in $\mathbb{G}$. There is a Galois topology on these making $\mathbb{G}$ a topological groupoid:

The basic open subsets of $G_0$ are the subsets
$$U_{\vec{i}, C} = \{ \alpha \in G_0 : \alpha (\vec{i}) \in C \}$$
where $\vec{i}$ is an $n$-tuple of elements of $K$ and $C$ is a right $M$-subset of $M^n$.
The basic open subsets of $G_1$ are the subsets
$$W_{\vec{i}, C, \vec{j}, D} = \{ (\alpha, \beta, m) \in G_1 : \alpha (\vec{i}) \in C, \beta (\vec{j}) \in D, \alpha (\vec{i}) \cdot m = \beta (\vec{j}) \}$$
where $\vec{i}$ and $\vec{j}$ are $n$-tuples of elements of $K$ and $C$ and $D$ are right $M$-subsets of $M^n$.

The theorem of Butz and Moerdijk is that $\mathcal{B} M$ is equivalent to the topos of equivariant sheaves on this topological groupoid $\mathbb{G}$. Note that the domain and codomain maps $G_1 \to G_0$ are locally connected, hence open a fortiori.