Skip to main content

MCP server exposing gmpy2 arbitrary precision arithmetic functions

Project description

mcp-gmpy2

MCP server exposing gmpy2 arbitrary precision arithmetic functions

PyPI Python Coverage Ruff

mcp-name: io.github.daedalus/mcp-gmpy2

Install

pip install mcp-gmpy2

Usage

# Run as stdio server
mcp-gmpy2

Available Tools

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

Development

git clone https://github.com/daedalus/mcp-gmpy2.git
cd mcp-gmpy2
pip install -e ".[test]"

# run tests
pytest

# format
ruff format src/ tests/

# lint
ruff check src/ tests/

# type check
mypy src/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_gmpy2-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_gmpy2-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_gmpy2-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_gmpy2-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_gmpy2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 36e17f00dde20134effb42853d6eb17094574f1634d02c89d0528ac1f36b5978
MD5 b958f46ad59147c3e2a300bdc2718042
BLAKE2b-256 a3a51b22412625fe1369a4a82157a14f2d51c262015fe72d8e923fce9451ad20

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_gmpy2-0.1.0.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp-gmpy2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_gmpy2-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_gmpy2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_gmpy2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62f51448a179a83633a96e95ae6cce5262d88746306eb9bcd754624aae848467
MD5 d4384dccf4024f41a31d1fcca865799e
BLAKE2b-256 fd36a0b001a8f9d841c09c8b22a3ee3d585b4bec423240bb9eb8bf036c46ab4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_gmpy2-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp-gmpy2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page