5. Given the sequence $\left\{x_{n}\right\}, x_{1}=1$, and $x_{n+1}=$ $\frac{\sqrt{3} x_{n}+1}{\sqrt{3}-x_{n}}$. Then $\sum_{n=1}^{2009} x_{n}=(\quad)$.
(A) 1
(B) -1
(C) $-2+\sqrt{3}$
(D) $2+\sqrt{3}$
5. C.

From the problem, we know
$$
\begin{array}{c}
x_{n+1}=\frac{x_{n}+\frac{\sqrt{3}}{3}}{1-\frac{\sqrt{3}}{3} x_{n}} . \\
\text { Let } x_{n}=\tan \alpha_{n} \text {. Then } \\
x_{n+1}=\tan \left(\alpha_{n}+\frac{\pi}{6}\right) .
\end{array}
$$

Thus, $x_{n+6}=x_{n}$.
It is easy to see that $x_{1}=1, x_{2}=2+\sqrt{3}, x_{3}=-2-\sqrt{3}$,
$$
\begin{array}{l}
x_{4}=-1, x_{5}=-2+\sqrt{3}, x_{6}=2-\sqrt{3}, \\
x_{7}=1, \cdots \cdots \\
\text { Therefore, } \sum_{n=1}^{2 \infty 09} x_{n}=x_{1}+x_{2}+x_{3}+x_{4}+x_{5} \\
=-2+\sqrt{3} .
\end{array}
$$