mcp-gmpy2
MCP server exposing gmpy2 arbitrary precision arithmetic functions
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 integermpq- Create arbitrary precision rationalmpfr- Create arbitrary precision floating-pointadd- Add two arbitrary precision integerssub- Subtract two arbitrary precision integersmul- Multiply two arbitrary precision integersdiv- Divide two arbitrary precision integerspow- Power operation with arbitrary precisionpowmod- Modular exponentiationmod- Modulo operationis_prime- Primality testis_probable_prime- Probabilistic primality testnext_prime- Next prime after nprev_prime- Previous prime before nprime_factors- Get prime factorizationgcd- Greatest common divisorlcm- Least common multiplegcdext- Extended GCDinvert- Modular inversefac- Factorialfib- Fibonacci numberluc- Lucas numberbinomial- Binomial coefficientsqrt- Integer square rootis_square- Check if perfect squareis_power- Check if perfect poweriroot- Integer n-th rootnum_digits- Number of digitsnum_bits- Number of bitslegendre- Legendre symboljacobi- Jacobi symbolkronecker- Kronecker symboltonelli- Tonelli-Shanks square rootmobius- Mobius functionphi- Euler's totientdivisors- All divisorsnum_divisors- Count of divisorssum_divisors- Sum of divisorspartition- Partition function p(n)is_smooth- Check if B-smoothis_sophie_germain- Sophie Germain prime testis_safe_prime- Safe prime testmiller_rabin- Miller-Rabin primality testlucas_lehmer- Lucas-Lehmer primality test for Mersennesieve- 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_gmpy2-0.1.0.tar.gz | 7.5 kB | With provenance | Details for mcp_gmpy2-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_gmpy2-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_gmpy2-0.1.0-py3-none-any.whl |
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 logRelease 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 logSecurity for mcp-gmpy2 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mcp_gmpy2-0.1.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.