Skip to main content

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/

Metadata

Release files for mcp-gmpy2 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-gmpy2 0.1.0
File Size Uploaded
mcp_gmpy2-0.1.0.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-gmpy2 0.1.0
File Interpreter ABI Platform
mcp_gmpy2-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / mcp_gmpy2-0.1.0.tar.gz

Download URL mcp_gmpy2-0.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
36e17f00dde20134effb42853d6eb17094574f1634d02c89d0528ac1f36b5978
BLAKE2b-256 checksum
How to use checksums
a3a51b22412625fe1369a4a82157a14f2d51c262015fe72d8e923fce9451ad20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 30, 2026.

Transparency log

Release files / mcp_gmpy2-0.1.0-py3-none-any.whl

Download URL mcp_gmpy2-0.1.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62f51448a179a83633a96e95ae6cce5262d88746306eb9bcd754624aae848467
BLAKE2b-256 checksum
How to use checksums
fd36a0b001a8f9d841c09c8b22a3ee3d585b4bec423240bb9eb8bf036c46ab4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page