What are cohomology of Lie algebra with coefficients geometrically? I want to find analog of following two statements.


*

*Let $G$ be a discrete group, $M$ is representation of $G$. Local systems on $BG$ are the same as $G$ representations (because $\pi_1 (BG) =G$). Let $\mathscr{M}$ be a local system corresponding to $M$. 
$$ H^{\bullet}_{Grp} (G, M) = H^{\bullet} (BG, \mathscr{M})$$

*Let $G$ be compact connected Lie group. $\mathfrak{g}$ is corresponding Lie algebra. $\mathbb{R}$ - trivial representation of $\mathfrak{g}$.
$$ H^{\bullet}_{Lie} (\mathfrak{g}, \mathbb{R}) = H_{dR}^{\bullet} (G)$$
Question: How to express $H^{\bullet}_{Lie} (\mathfrak{g}, M)$ geometrically? Here $M$ is a  finite dimensional representation of $\mathfrak{g}$ (if you wish you can assume that it is integrated to Lie group representation).
Comment 1 :
I am even not sure which geometric object corresponds to representation of $\mathfrak{g}$. Is it bi-D-module (bimodule over differential operators)? Is it $G \times G$ equivariant bundle on $G$?
Comment 2:
I want to say in other words what I want. I want a geometric structure on group $G$ considered as a manifold, which counts $H^{\bullet}_{Lie} (\mathfrak{g}, M)$ . It can be sheaf, D-module, whatever. The point is that I want to forget that $G$ is a group. I want just  $G$ considered as a manifold with extra geometric structure. And the way to get my cohomology back.
 A: Examining the complex used to calculate $H^*(\mathfrak{g};\mathbb{R})$, one sees that it is precisely the complex of $G$-invariant differential forms on $G$. (To see this, take the left-trivialization of the tangent bundle of $G$, and re-write all exterior power bundles in terms of this trivialization.) I suppose the geometric content is that the cohomology of this complex coincides with that of all differential forms on $G$, namely $H^*_{dR}(G;\mathbb{R})$. 
Let me briefly address your point about geometric interpretations of Lie algebra representations. Let $\mathfrak{g}\rightarrow End(V)$ is a $\mathfrak{g}$-representation. You can integrate it to a Lie group representation $G\rightarrow Aut(V)$, where $G$ is the connected, simply-connected Lie group with Lie algebra $\mathfrak{g}$. In this sense, the Lie algebra represention is an "infinitesimal" version of the Lie group representation.
Also, whenever a Lie group $G$ acts smoothly on a manifold $M$, there is a representation of its Lie algebra $\mathfrak{g}$ on the Lie algebra of all vector fields on $M$. One associates to each element of $\mathfrak{g}$ a fundamental vector field on $M$.
A: We assume $G$ is a compact connected Lie group with Lie algebra $\mathfrak{g}$. Let $\rho:\mathfrak{g}\to \mathrm{End}(E)$ is a  finite representation.
We denote by $\underline{E}=G\times E$ the trivial bundle over $G$. Take $U\in \mathfrak{g}$, then $U$ define a left-invariant vector field $X_U$ on $G$. 
For $s\in C^\infty(G,\underline{E})$, we define the $G$ action by,
$(g\cdot s)(x)=s(g^{-1}x)$. Take $e\in E$, then $e$ define a $G$-invariant section $s_e$ of $\underline{E}$, that is 
$s_e(x)=e.$
We define a connection on $\underline{E}$ by 
$$\nabla_{X_U}s_e=s_{\rho(U)e}.$$
This is a flat connection.  The $G$-invariant part of the de Rham cohomology associated to this flat bundle $(\underline{E},\nabla)$ is what you are looking for in comment 2, i.e.,
$$\Big(H^\cdot_{dR}(G,\underline{E})\Big)^G=H^\cdot(\mathfrak{g},E).$$
To show this, we identify $\Omega^\cdot(G,\underline{E})^G$  the left-G-invariant differential form with coefficients in $\underline{E}$, with $\mathrm{Hom}(\Lambda^\cdot(\mathfrak{g}),E)$. Under this identification, The de Rham differential operator $d$ become the differential of the complex $\mathrm{Hom}(\Lambda^\cdot(\mathfrak{g}),E)$. This means
$$H^\cdot(\Omega^\cdot(G,\underline{E})^G,d)=H^\cdot(\mathfrak{g},E).$$
We apply the Hodge theorem. We denote by $\Box$ the Hodge Laplacian, we get
$$\Omega(G,\underline{E})=H_{dR}^\cdot(G,\underline{E})\oplus \mathrm{im}(\Box)$$
Since  $\Box$ commut  with $G$, we have
$$\Omega(G,\underline{E})^G=H_{dR}^\cdot(G,\underline{E})^G\oplus \mathrm{im}(\Box)^G.$$ From last equation, we get
$$H_{dR}^\cdot(G,\underline{E})^G=H^\cdot(\Omega^\cdot(G,\underline{E})^G,d).$$
