This is a very special case of the Fock-Goncharov construction.

Divide your ideal n-gon into n-2 ideal triangles. Given one cross ratio associated to each edge (i.e., to the 4 ideal vertices of the two ideal triangles adjacent to that edge) you want to reconstruct a representation $\Gamma\to PSL(2,{\mathbb R})$ from those cross ratios.

First you need some auxiliary construction. Fix the subdivision of your ideal n-gon into n-2 ideal triangles. It gives you an ideal triangulation of the double $D^d$. Let $T^\prime$ be the dual graph to this triangulation, i.e., it has one vertex inside each ideal triangle, and one edge transverse to each edge of the ideal triangulation. Let $T$ be the expanded dual graph, i.e., you expand each vertex of $T^\prime$ to a triangle, each of whose vertices is adjacent to one of the three outgoing edges. So $T$ has some „interior edges“ (which are inside an ideal triangle) and some „crossing edges“ (which cross an edge of the ideal triangulation).

Now every path in $D^d$ is homotopic to a path in $T$. So, a representation $\Gamma\to PSL(2,{\mathbb R})$ is given as soon as you associate a matrix in $PSL(2,{\mathbb R})$ to each edge of $T$, provided that along a 0-homotopic path the matrices multiply up to the identity matrix.

It turns out that the way to do this is to associate to each „interior edge“ the matrix $\left(\begin{array}{cc}0&-1\\
1&1\end{array}\right)$, and to each „crossing edge“ the matrix $\left(\begin{array}{cc}0&-\sqrt{z}\\
\frac{1}{\sqrt{z}}&0\end{array}\right)$, where $z$ is the cross ratio associated to the crossed edge (i.e., to the 4 vertices of the adjacent ideal triangles). You can check that 0-homotopic loops are sent to the identity. More importantly, this representation yields an equivariant map of ideal boundaries such that the cross ratio associated to any edge is indeed the given $z$. It suffices to check this for adjacent triangles with vertices $\infty,-1,0,z$ which (in the Fock-Goncharov normalization) have cross ratio $z$ and where the above matrix switches $\infty$ and $0$, and sends $-1$ to $z$.