[proofplan]
We first separate the zero algebra, since the remaining argument uses the unit of $A$. For nonzero finite-dimensional $A$, the centre is a finite-dimensional commutative $C^*$-algebra, so its minimal central projections split $A$ into finitely many central ideals. Each central summand has centre equal to the scalar multiples of its unit, which forces it to be simple. The finite-dimensional simple classification then identifies the summands with full matrix algebras, and uniqueness follows by comparing minimal central projections and matrix dimensions.
[/proofplan]
[step:Handle the zero algebra before using a unit]
If $A=0$, take $r=0$. The empty direct sum is the zero $C^*$-algebra, so the asserted decomposition holds. The uniqueness assertion is only stated for $A\neq 0$, so there is nothing further to prove in this case.
For the rest of the proof, assume $A\neq 0$.
[/step]
[step:Use the centre to obtain minimal central projections]
We use the standard finite-dimensional fact that every nonzero finite-dimensional $C^*$-algebra is unital (citing a result not yet in the wiki: finite-dimensional $C^*$-algebras are unital when nonzero). Let $1_A$ denote its unit. Define the centre of $A$ by
\begin{align*}
Z(A):=\{z\in A: za=az \text{ for every } a\in A\}.
\end{align*}
Then $Z(A)$ is a finite-dimensional commutative unital $C^*$-subalgebra of $A$.
By the finite-dimensional commutative $C^*$-algebra classification (citing a result not yet in the wiki: finite-dimensional commutative $C^*$-algebras are isomorphic to $\mathbb C^r$), there are an integer $r\in\mathbb N$ and a unital $*$-isomorphism
\begin{align*}
\theta:Z(A)\to \mathbb C^r.
\end{align*}
For each $j\in\{1,\dots,r\}$, let $e_j\in \mathbb C^r$ be the coordinate unit with $1$ in the $j$th coordinate and $0$ elsewhere, and define
\begin{align*}
p_j:=\theta^{-1}(e_j)\in Z(A).
\end{align*}
Since each $e_j$ is a projection in $\mathbb C^r$ and $\theta$ is a $*$-isomorphism, each $p_j$ is a projection in $Z(A)$. Since $e_i e_j=0$ for $i\neq j$ and $\sum_{j=1}^r e_j=(1,\dots,1)$, we have
\begin{align*}
p_i p_j=0 \quad \text{for } i\neq j
\end{align*}
and
\begin{align*}
1_A=\sum_{j=1}^r p_j.
\end{align*}
Moreover, the projections $p_1,\dots,p_r$ are precisely the minimal nonzero central projections: if $q\in Z(A)$ is a nonzero projection with $q\le p_j$, then $\theta(q)$ is a nonzero projection in the one-dimensional algebra $\mathbb C e_j$, hence $\theta(q)=e_j$, so $q=p_j$.
[/step]
[step:Split $A$ as the direct sum of the central ideals $p_jA$]
For each $j\in\{1,\dots,r\}$, define
\begin{align*}
A_j:=p_jA=\{p_j a:a\in A\}.
\end{align*}
Because $p_j$ is central, $A_j$ is a two-sided $*$-ideal of $A$, and $p_j$ is the unit of $A_j$.
Define the map
\begin{align*}
\Phi:A\to \bigoplus_{j=1}^r A_j
\end{align*}
by
\begin{align*}
\Phi(a):=(p_1a,\dots,p_ra).
\end{align*}
Define also
\begin{align*}
\Psi:\bigoplus_{j=1}^r A_j\to A
\end{align*}
by
\begin{align*}
\Psi(a_1,\dots,a_r):=\sum_{j=1}^r a_j.
\end{align*}
The orthogonality relations $p_i p_j=0$ for $i\neq j$ show that $\Phi$ and $\Psi$ are inverse algebra homomorphisms. Since each $p_j$ is self-adjoint and central, both maps preserve the adjoint operation. Thus $\Phi$ is a bijective $*$-homomorphism. By [citetheorem:8547], applied to $\Phi$ and to its inverse $\Psi$, the map $\Phi$ is isometric. Hence
\begin{align*}
A\cong \bigoplus_{j=1}^r A_j
\end{align*}
as $C^*$-algebras.
[/step]
[step:Show each central summand is simple]
Fix $j\in\{1,\dots,r\}$, and write $B:=A_j=p_jA$. We first identify the centre of $B$. Let
\begin{align*}
Z(B):=\{b\in B: bx=xb \text{ for every } x\in B\}.
\end{align*}
If $z\in Z(B)$ and $a\in A$, then
\begin{align*}
a=\sum_{k=1}^r p_k a.
\end{align*}
Since $z\in p_jA$, we have $zp_k=0=p_kz$ for $k\neq j$, and since $z$ is central in $B$, it commutes with $p_j a\in B$. Therefore $za=az$ for every $a\in A$, so $z\in Z(A)$. Also $p_jz=z$, so $z$ lies in the one-dimensional central summand $\mathbb C p_j$. Hence
\begin{align*}
Z(B)=\mathbb C p_j.
\end{align*}
Now let $I\trianglelefteq B$ be a nonzero closed two-sided ideal. Since $I$ is a nonzero finite-dimensional $C^*$-algebra, it has a unit $q\in I$ (again using the standard finite-dimensional unitality fact for nonzero $C^*$-algebras). The element $q$ is a projection. For every $b\in B$, both $qb$ and $bq$ belong to $I$, and the identity property of $q$ on $I$ gives
\begin{align*}
(qb)q=qb
\end{align*}
and
\begin{align*}
q(bq)=bq.
\end{align*}
Thus $qb=q b q=bq$, so $q\in Z(B)$. Since $Z(B)=\mathbb C p_j$ and $q$ is a nonzero projection, we must have $q=p_j$. Therefore $p_j\in I$, and since $p_j$ is the unit of $B$, it follows that $I=B$. Thus $B=A_j$ is simple.
[guided]
Fix $j\in\{1,\dots,r\}$ and set $B:=p_jA$. The point is to prove that the central projection $p_j$ cuts out an indecomposable summand. We do this in two stages: first compute the centre of $B$, then use the identity of any nonzero ideal to manufacture a central projection.
Define
\begin{align*}
Z(B):=\{b\in B: bx=xb \text{ for every } x\in B\}.
\end{align*}
We claim that $Z(B)=\mathbb C p_j$. Let $z\in Z(B)$. Since $1_A=\sum_{k=1}^r p_k$, every $a\in A$ decomposes as
\begin{align*}
a=\sum_{k=1}^r p_k a.
\end{align*}
Because $z\in B=p_jA$, we have $zp_k=0=p_kz$ whenever $k\neq j$. The only remaining component is $p_j a$, which belongs to $B$, and $z$ commutes with every element of $B$ by the definition of $Z(B)$. Therefore $z$ commutes with each summand $p_k a$, and hence $za=az$ for every $a\in A$. This proves $z\in Z(A)$.
We also have $p_jz=z$, so $z$ is supported on the central projection $p_j$. Under the isomorphism $\theta:Z(A)\to\mathbb C^r$, this says that $\theta(z)$ is supported only in the $j$th coordinate. The elements of $\mathbb C^r$ supported only in the $j$th coordinate are exactly the scalar multiples of $e_j$. Pulling back by $\theta$, we obtain $z\in\mathbb C p_j$. Since every scalar multiple of $p_j$ plainly commutes with $B$, this proves
\begin{align*}
Z(B)=\mathbb C p_j.
\end{align*}
Now let $I\trianglelefteq B$ be a nonzero closed two-sided ideal. Because $I$ is finite-dimensional and is itself a nonzero $C^*$-algebra, the standard finite-dimensional unitality fact gives a unit $q\in I$. This unit is a projection. We show that it is central in $B$. For any $b\in B$, the two-sided ideal property gives $qb\in I$ and $bq\in I$. Since $q$ is the identity element of $I$, multiplication by $q$ fixes these two elements:
\begin{align*}
(qb)q=qb
\end{align*}
and
\begin{align*}
q(bq)=bq.
\end{align*}
Both expressions have the same middle product $q b q$, so $qb=bq$. Since this holds for every $b\in B$, we have $q\in Z(B)$.
The equality $Z(B)=\mathbb C p_j$ now forces $q=\lambda p_j$ for some $\lambda\in\mathbb C$. Because $q$ is a nonzero projection, the scalar $\lambda$ satisfies $\lambda^2=\lambda$ and $\lambda\neq 0$, hence $\lambda=1$. Therefore $q=p_j$. Since $p_j$ is the unit of $B$ and $p_j\in I$, every $b\in B$ satisfies
\begin{align*}
b=p_jb\in I.
\end{align*}
Thus $I=B$. We have proved that $B=p_jA$ has no nonzero proper closed two-sided ideals, so $B$ is simple.
[/guided]
[/step]
[step:Identify the simple summands with full matrix algebras]
For each $j\in\{1,\dots,r\}$, the algebra $A_j=p_jA$ is a finite-dimensional simple $C^*$-algebra. By [citetheorem:8587], there exists an integer $n_j\in\mathbb N$ and a $C^*$-algebra isomorphism
\begin{align*}
A_j\cong M_{n_j}(\mathbb C).
\end{align*}
Combining these isomorphisms with the direct-sum decomposition of $A$ gives
\begin{align*}
A\cong \bigoplus_{j=1}^r M_{n_j}(\mathbb C)
\end{align*}
as $C^*$-algebras.
[/step]
[step:Recover the multiset of matrix sizes from the algebra]
Assume $A\neq 0$ and suppose also that
\begin{align*}
A\cong \bigoplus_{k=1}^s M_{m_k}(\mathbb C)
\end{align*}
as $C^*$-algebras, with $m_1,\dots,m_s\in\mathbb N$. The centre of $\bigoplus_{j=1}^r M_{n_j}(\mathbb C)$ is
\begin{align*}
\bigoplus_{j=1}^r \mathbb C 1_{M_{n_j}(\mathbb C)},
\end{align*}
and its minimal nonzero central projections are exactly the coordinate units. The same description holds for the second decomposition with $s$ summands.
A $*$-isomorphism maps centres to centres and maps minimal nonzero central projections to minimal nonzero central projections. Hence it gives a bijection between the $r$ coordinate central projections in the first decomposition and the $s$ coordinate central projections in the second decomposition. Therefore $r=s$, and after reindexing there are $*$-isomorphisms
\begin{align*}
M_{n_j}(\mathbb C)\cong M_{m_j}(\mathbb C)
\end{align*}
for each $j\in\{1,\dots,r\}$.
A $*$-isomorphism is in particular a complex-linear vector-space isomorphism. Since
\begin{align*}
\dim_{\mathbb C} M_n(\mathbb C)=n^2
\end{align*}
for every $n\in\mathbb N$, the equality of dimensions gives $n_j^2=m_j^2$. Because $n_j$ and $m_j$ are positive integers, $n_j=m_j$. Thus the multiset $\{n_1,\dots,n_r\}$ is uniquely determined by $A$.
[/step]