# mcp-gmpy2

Source: https://glimind.com/server/pypi%2Fmcp-gmpy2
Registry id: `pypi/mcp-gmpy2`
Status: unknown

## Install

```json
{
  "mcpServers": {
    "mcp-gmpy2": {
      "command": "uvx",
      "args": [
        "mcp-gmpy2"
      ]
    }
  }
}
```

Claude Code:

```sh
claude mcp add mcp-gmpy2 -- uvx mcp-gmpy2
```

## Tools (45)

- `add`: Add two arbitrary precision integers
- `binomial`: Binomial coefficient
- `div`: Divide two arbitrary precision integers
- `divisors`: All divisors
- `fac`: Factorial
- `fib`: Fibonacci number
- `gcd`: Greatest common divisor
- `gcdext`: Extended GCD
- `invert`: Modular inverse
- `iroot`: Integer n-th root
- `is_power`: Check if perfect power
- `is_prime`: Primality test
- `is_probable_prime`: Probabilistic primality test
- `is_safe_prime`: Safe prime test
- `is_smooth`: Check if B-smooth
- `is_sophie_germain`: Sophie Germain prime test
- `is_square`: Check if perfect square
- `jacobi`: Jacobi symbol
- `kronecker`: Kronecker symbol
- `lcm`: Least common multiple
- `legendre`: Legendre symbol
- `luc`: Lucas number
- `lucas_lehmer`: Lucas-Lehmer primality test for Mersenne
- `miller_rabin`: Miller-Rabin primality test
- `mobius`: Mobius function
- `mod`: Modulo operation
- `mpfr`: Create arbitrary precision floating-point
- `mpq`: Create arbitrary precision rational
- `mpz`: Create arbitrary precision integer
- `mul`: Multiply two arbitrary precision integers
- `next_prime`: Next prime after n
- `num_bits`: Number of bits
- `num_digits`: Number of digits
- `num_divisors`: Count of divisors
- `partition`: Partition function p(n)
- `phi`: Euler's totient
- `pow`: Power operation with arbitrary precision
- `powmod`: Modular exponentiation
- `prev_prime`: Previous prime before n
- `prime_factors`: Get prime factorization
- `sieve`: Generate primes up to n
- `sqrt`: Integer square root
- `sub`: Subtract two arbitrary precision integers
- `sum_divisors`: Sum of divisors
- `tonelli`: Tonelli-Shanks square root

Measured by Glimind (https://glimind.com): MCP handshake + tool list only, no tool is ever called. CC BY 4.0.
