Step 1: Recall Mohr-Coulomb criterion.
Shear strength of rock:
\[
\tau = c + \sigma \tan \phi
\]
where \(c\) = cohesion, \(\phi\) = angle of internal friction.
Step 2: Relation between uniaxial compressive strength (UCS) and cohesion.
For uniaxial compression test:
\[
\sigma_3 = 0, \quad \sigma_1 = \text{UCS}
\]
The relation is:
\[
\sigma_1 = \frac{2c \cos \phi}{1 - \sin \phi}
\]
Step 3: Substitute values.
Given: \(\sigma_1 = 7 \, \text{MPa}, \, \phi = 30^\circ\).
\[
7 = \frac{2c \cos 30^\circ}{1 - \sin 30^\circ}
\]
Step 4: Simplify.
\[
\cos 30^\circ = \frac{\sqrt{3}}{2}, \quad \sin 30^\circ = \frac{1}{2}
\]
\[
7 = \frac{2c \cdot (\sqrt{3}/2)}{1 - 1/2}
\]
\[
7 = \frac{c \sqrt{3}}{0.5}
\]
\[
7 = 2c \sqrt{3}
\]
Step 5: Solve for \(c\).
\[
c = \frac{7}{2 \sqrt{3}} = \frac{7}{3.464} \approx 2.02 \, \text{MPa}
\]
Final Answer: \[ \boxed{2.02 \, \text{MPa}} \]