  Let A be a commutative k-algebra, where k is an algebraically closed field of
characteristic 0, and let M be an A-module. We consider the following question:
Under what conditions on A and M is it possible to find a connection on M?
  We consider maximal Cohen-Macaulay (MCM) modules over complete CM algebras
that are isolated singularities, and usually assume that the singularities have
finite CM representation type. It is known that over a simple singularity of
dimension at most two, any MCM module admits an integrable connection. We prove
that over a simple singularity of dimension at least three, an MCM module
admits connections if and only if it is free. Among singularities of finite CM
representation type, we find examples of curves with MCM modules that do not
admit connections, and threefolds with non-free MCM modules that do admit
connections.
  Let A be a singularity not necessarily of finite CM representation type, and
consider the condition that A is a Gorenstein curve or a Q-Gorenstein
singularity of dimension at least two. We show that this condition is
sufficient for the canonical module of A to admit an integrable connection, and
conjecture that it is also necessary. In support of the conjecture, we show
that if A is a monomial curve singularity, then the canonical module of A
admits an integrable connection if and only if A is Gorenstein.
