  All-electrical writing and reading of spin states attract considerable
attention for their promising applications in energy-efficient spintronics
devices. Here we show, based on rigorous first-principles calculations, that
the spin properties can be manipulated and detected in molecular spinterfaces,
where an iron tetraphenyl porphyrin (FeTPP) molecule is deposited on
boron-substituted graphene (B-G). Notably, a reversible spin switching between
the $S=1$ and $S=3/2$ states is achieved by a gate electrode. We can trace the
origin to a strong hybridization between the Fe-$d_{{z}^2}$ and B-$p_z$
orbitals. Combining density functional theory with nonequilibrium Green's
function formalism, we propose an experimentally feasible 3-terminal setup to
probe the spin state. Furthermore, we show how the in-plane quantum transport
for the B-G, which is non-spin polarized, can be modified by FeTPP, yielding a
significant transport spin polarization near the Fermi energy ($>10\%$ for
typical coverage). Our work paves the way to realize all-electrical spintronics
devices using molecular spinterfaces.
