Using KCL in Mesh Analysis
In fact, circuit analysis by the method of the meshes, is not based on the KCL, if not in the KVL.. Suppose the following circuit:







simulate this circuit &ndash; Schematic created using CircuitLab

To perform mesh analysis, we propose the three currents displayed. Keep in mind that these three currents are actually proposed, which does not mean they are the actual currents.

Given these currents, write the KVL to each mesh

$$
V_1 = I_1\cdot R_1 + (I_1 - I_2)\cdot R_2 \\
0 = (I_1 - I_2)\cdot R_2 + I_2\cdot R_3 + (I_2 - I_3)\cdot R_4 \\
(I_2 - I_3)\cdot R_4 + I_3\cdot R_5 - V_2 = 0
$$

Applying a little algebra, we can rewrite the system of equations as:

$$
I_1\cdot R_{11} - I_2 \cdot R_{12} =  V_1\\
-I_1\cdot R_{21} + I_2\cdot R_{22} - I_3\cdot R_{23} = 0\\
-I_2\cdot R_{32} + I_3\cdot R{33} = V_2
$$

Where

$$
R_{11} = R_1 + R_2\qquad R_{22} = R_2 + R_3 + R_4\qquad R_{33}=R_4 + R_5\\
R_{12} = R_{21} = -R_2 \qquad R_{23} = R_{32} = -R_4\qquad R_{13}=R_{31}=0\\
$$

And this system accepts a matrix representation:

$$
\left(\begin{matrix}
R_{11} &amp; R_{12} &amp; R_{13}\\
R_{21} &amp; R_{22} &amp; R_{23}\\
R_{31} &amp; R_{32} &amp; R_{33}
\end{matrix}\right)\cdot
\left(\begin{matrix}
I_1\\
I_2\\
I_3
\end{matrix}\right)=
\left(\begin{matrix}
V_1\\
0\\
V_2
\end{matrix}\right)
$$

Solving this system we find the three current proposed.

But we must not forget that these currents are proposed; for example, if \$I_1\$ give a negative result means that the actual current in the circuit is counterclockwise. Moreover, to find the actual current through \$R_2\$ should subtract the currents \$I_1\$ and \$I_2\$.
You see, an analysis by the method of the mesh, implies apply KVL.