$\renewcommand{\g}{{\mathfrak g}} $ We say that a Lie algebra $\g$ is perfect if $[\g,\g]=\g$.
Question. Does there exist a finite dimensional, perfect Lie algebra $\g$ over $\Bbb C$ with nontrivial center?
If the answer is "Yes", I would like to see a nice example.
The $6$-dimensional Lie algebra $\mathfrak{sl}_2(\Bbb C)\ltimes_{\phi} \mathfrak{n}_3(\Bbb C)$, which appears in the classification of all complex $6$-dimensional Lie algebras here is perfect and has $1$-dimensional center. Here $\mathfrak{n}_3(\Bbb C)$ is the $3$-dimensional Heisenberg Lie algebra. It seems that this is also the example from the other answer. In fact, the other Lie algebras from the classification list in dimension $6$ are either not perfect, or have trivial center.