Write formula in MSO such that for each component in undirected graph there exists some node which satisfy $P$.
My idea is: for each node there exists path to node satisfying $P$.
$\forall_{x} \exists_y [Path(x,y) \wedge P(y)]$
$Path(x,y) = $ there exists finite directed path from $x$ to $y$
$Path(x,y) = \exists_R [x = y \vee [(\text{$R$ is finite directed order}) \wedge (\forall_z R(x,z))\wedge (\forall_z R(z,y))\wedge \phi(x,y)]]$
$\phi(x,y)$ = for each sequent nodes between $x$ and $y$ there exists edge:
$\phi(x,y)=\forall_{z,t}[[R(z,y) \wedge R(x,z)\wedge(\forall_{u}((R(z,u)\wedge R(u,t))) \to (u = z\vee u = t)))] \to \exists E(z,t)]$
$\text{$R$ is finite directed order} = \forall_{u} \neg R(u,u) \wedge (\forall_{u,v} (R(u,v)\vee R(v,u) ) \wedge (\forall_{u,v} (R(u,v)\wedge R(v,u))\to u=v)\wedge ((\forall_{u,v,w} (R(u,v)\wedge R(v,w)))\to R(u,w))\wedge (\text{$R$ is finite relation})$
I believe that finitness of relation can be easily expressed in MSO, but at this moment I would prefer wait for you answer about this stage. I can write such formula using second order: something like: not exists bijection between set and its subset..... I think that it may be difficult without quantyfying over functions..