Fine all positive integers $m,n\geq 2$, such that 
(1) $m+1$ is a prime number of type $4k-1$;
(2) there is a (positive) prime number $p$ and nonnegative integer $a$, such that
\[\frac{m^{2^n-1}-1}{m-1}=m^n+p^a.\]
1. Given the conditions:
   - \( m+1 \) is a prime number of the form \( 4k-1 \).
   - There exists a prime number \( p \) and a nonnegative integer \( a \) such that:
     \[
     \frac{m^{2^n-1}-1}{m-1} = m^n + p^a.
     \]

2. We start by rewriting the given equation:
   \[
   \frac{m^{2^n-1}-1}{m-1} - m^n = p^a.
   \]
   Let \( D = \frac{m^{2^n-1}-1}{m-1} - m^n \).

3. We claim that \( m^{2^k} + 1 \mid D \). To prove this, we need to show \( m^{2^k} + 1 \mid mD \) since \( \gcd(m, m^{2^k} + 1) = 1 \).

4. Consider:
   \[
   mD = \frac{m^{2^n} - 1}{m-1} - m^{n+1}.
   \]
   Using the factorization of \( m^{2^n} - 1 \):
   \[
   mD = (m+1)(m^2+1) \cdots (m^{2^{n-1}}+1) - (m^{2^k}+1)(m^{2^k(s-1)} - m^{2^k(s-2)} + \cdots).
   \]
   This can be rewritten as:
   \[
   mD = (m^{2^k}+1)\left((m+1)(m^2+1) \cdots (m^{2^{r-1}}+1)(m^{2^{r+1}}+1) \cdots (m^{2^{n-1}}+1) - m^{2^k(s-1)} - m^{2^k(s-2)} + \cdots\right).
   \]
   Hence, \( m^{2^k} + 1 \mid mD \).

5. Let \( q = m+1 \) be the prime. Then \( q = m+1 \mid m^{2^k} + 1 \mid p^a \), which implies \( p = q \).

6. Plugging \( p = m+1 \) into the initial equation, we get:
   \[
   m^{2^n-2} + m^{2^n-3} + \cdots + m + 1 = m^n + (m+1)^a.
   \]

7. If \( n \geq 3 \), we consider two cases:
   - If \( m \equiv 2 \pmod{8} \):
     \[
     m^{2^n-2} + m^{2^n-3} + \cdots + m + 1 \equiv 7 \pmod{8},
     \]
     \[
     m^n + (m+1)^a \equiv 3^a \equiv 1, 3 \pmod{8}.
     \]
     Hence, no solutions.
   - If \( m \equiv 6 \pmod{8} \):
     \[
     m^{2^n-2} + m^{2^n-3} + \cdots + m + 1 \equiv 3 \pmod{8},
     \]
     \[
     m^n + (m+1)^a \equiv 7^a \equiv 1, 7 \pmod{8}.
     \]
     Hence, no solutions.

8. For \( n = 2 \), all \( m+1 \) such that \( m+1 \) is a prime of the form \( 4k-1 \) works (here \( a = 1 \)).

9. Therefore, the solutions are:
   \[
   (m, n) = (p-1, 2),
   \]
   where \( p \) is a prime of the form \( 4k-1 \).

The final answer is \( \boxed{ (m, n) = (p-1, 2) } \) where \( p \) is a prime of the form \( 4k-1 \).