  In this paper we introduce the Sch\"utzenberger category $\mathbb D(S)$ of a
semigroup $S$. It stands in relation to the Karoubi envelope (or Cauchy
completion) of $S$ in the same way that Sch\"utzenberger groups do to maximal
subgroups and that the local divisors of Diekert do to the local monoids $eSe$
of $S$ with $e\in E(S)$. In particular, the objects of $\mathbb D(S)$ are the
elements of $S$, two objects of $\mathbb D(S)$ are isomorphic if and only if
the corresponding semigroup elements are $\mathscr D$-equivalent, the
endomorphism monoid at $s$ is the local divisor in the sense of Diekert and the
automorphism group at $s$ is the Sch\"utzenberger group of the $\mathscr
H$-class of $S$. This makes transparent many well-known properties of Green's
relations.
  The paper also establishes a number of technical results about the Karoubi
envelope and Sch\"utzenberger category that were used by the authors in a
companion paper on syntactic invariants of flow equivalence of symbolic
dynamical systems.
