  We present an elementary construction of a (highly degenerate) Hopf pairing
between the universal enveloping algebra $U(\mathfrak{g})$ of a
finite-dimensional Lie algebra $\mathfrak{g}$ over arbitrary field $\mathbf{k}$
and the Hopf algebra $\mathcal{O}(\mathrm{Aut}(\mathfrak{g}))$ of regular
functions on the automorphism group of $\mathfrak{g}$. This pairing induces a
Hopf action of $\mathcal{O}(\mathrm{Aut}(\mathfrak{g}))$ on $U(\mathfrak{g})$
which together with an explicitly given coaction makes $U(\mathfrak{g})$ into a
braided commutative Yetter--Drinfeld
$\mathcal{O}(\mathrm{Aut}(\mathfrak{g}))$-module algebra. From these data one
constructs a Hopf algebroid structure on the smash product algebra
$\mathcal{O}(\mathrm{Aut}(\mathfrak{g}))\sharp U(\mathfrak{g})$ retaining
essential features from earlier constructions of a Hopf algebroid structure on
infinite-dimensional versions of Heisenberg double of $U(\mathfrak{g})$,
including a noncommutative phase space of Lie algebra type, while avoiding the
need of completed tensor products.
  We prove a slightly more general result where algebra
$\mathcal{O}(\mathrm{Aut}(\mathfrak{g}))$ is replaced by
$\mathcal{O}(\mathrm{Aut}(\mathfrak{h}))$ and where $\mathfrak{h}$ is any
finite-dimensional Leibniz algebra having $\mathfrak{g}$ as its maximal Lie
algebra quotient.
