6. Given $a>0$, draw any line through $M(a, 0)$ intersecting the parabola $y^{2}=2 p x$ $(p>0)$ at points $P$ and $Q$. If $\frac{1}{|M P|^{2}}+\frac{1}{|M Q|^{2}}$ is a constant, then $a=$
6. Prompt: Let the line passing through $M(a, 0)$ be $\left\{\begin{array}{l}x=a+t \cos \alpha \\ y=t \sin \alpha,\end{array}\right.$ Substituting into $y^{2}=$ $2 p x$, we get
$$
\sin ^{2} \alpha \cdot t^{2}-2 p \cos \alpha \cdot t-2 p a=0,
$$

Thus, $t_{1}+t_{2}=\frac{2 p \cos \alpha}{\sin ^{2} \alpha}, t_{1} t_{2}=-\frac{2 p a}{\sin ^{2} \alpha}$, then
$$
\begin{aligned}
\frac{1}{|M P|^{2}}+\frac{1}{|M Q|^{2}} & =\frac{1}{t_{1}^{2}}+\frac{1}{t_{2}^{2}}=\frac{t_{1}^{2}+t_{2}^{2}}{t_{1}^{2} \cdot t_{2}^{2}} \\
& =\frac{\left(t_{1}+t_{2}\right)^{2}-2 t_{1} t_{2}}{\left(t_{1} \cdot t_{2}\right)^{2}} \\
& =\frac{\cos ^{2} \alpha}{a^{2}}+\frac{\sin ^{2} \alpha}{p a} \\
& =\frac{p \cos ^{2} \alpha+a \sin ^{2} \alpha}{p a^{2}} \\
& =\frac{a-p}{p a^{2}} \sin ^{2} \alpha+\frac{1}{a^{2}},
\end{aligned}
$$

Clearly, only $a=p$ holds.