Number Theory MCP server
MCP server exposing number theory functions and factorization algorithms
0 stars12 downloads/wk
Reviews
Write oneNobody has reviewed Number Theory yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Number Theory tools (55)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
SQUFOFFactor n using Shanks' Square Forms Factorization. Returns (p, q) if found.
brentFactor n using Brent's algorithm (Pollard rho with optimizations). Returns a factor.
carmichaelFactor n using Carmichael's method. Returns list of factor pairs.
chinese_remainderSolve the Chinese Remainder Theorem. Given moduli m and remainders a, find x such that x ≡ a[i] (mod m[i]).
close_factorFactor n using close factor algorithm. Returns (p, q) if found.
contfrac_to_rationalConvert continued fraction to rational number.
difference_of_powers_factorFactor using difference of powers method. Returns list of factors.
dixonFactor n using Dixon's factorization method. Returns (p, q) if found.
dlp_bruteforceSolve discrete logarithm by brute force: find x such that g^x ≡ h (mod p).
euler_factorizationFactor n using Euler's factorization method. Returns (p, q) if found.
facCompute the factorial of n.
factor_2PNFactor n with P prime > 2. Returns (p, q) if found.
factor_XYXZFactor integer of form x^y * x^z. Returns (p, q) if found.
factor_high_and_low_bits_equalFactor when high and low bits are equal. Returns (p, q) if found.
fermatFactor n using Fermat's factorization method. Returns (p, q).
fibCompute the n-th Fibonacci number.
find_periodFind the period of n in binary representation.
gcdCompute the greatest common divisor of a and b.
gcdextCompute the extended GCD of a and b. Returns dict with g, x, y where g = ax + by.
getpubkeyszGet public key size in bits.
hartFactor n using Hart's one-line factorization. Returns (p, q).
ilogCompute the integer log of n (natural log).
ilog10Compute the integer log base 10 of n.
ilog2Compute the integer log base 2 of n.
introotCompute the integer r-th root of n. Returns None if not a perfect r-th power.
inverseinversesqrt2expCompute modular inverse square root approximation with k bits.
invertCompute the modular inverse of a modulo b using Fermat's little theorem.
invmodCompute the modular inverse of a modulo m.
is_cubeCheck if n is a perfect cube.
is_lucasCheck if n is a Lucas number.
is_primeTest if n is prime using probabilistic methods.
is_squareCheck if n is a perfect square.
isqrtCompute the integer square root of n.
kraitchikFactor n using Kraitchik factorization. Returns (p, q).
lcmCompute the least common multiple of x and y.
legendreCompute the Legendre symbol (a/p).
lehmanFactor n using Lehman's factorization algorithm. Returns (p, q) if found.
lehmer_machineFactor n using Lehmer's machine (fermat-based). Returns (p, q).
lucasCompute the n-th Lucas number.
neg_powCalculate a^b mod n when b is negative.
next_primeFind the next prime after n.
phiCompute Euler's totient function phi(n) given the prime factors of n.
pollard_P_1Factor n using Pollard's P-1 algorithm. Returns (p, q) if found.
pollard_rhoFactor n using Pollard's rho algorithm. Returns a factor.
pollard_strassenFactor n using Pollard-Strassen algorithm. Returns (p, q) if found.
powmodCompute b^e mod m using modular exponentiation.
powmod_base_listCompute powmod for a list of bases.
powmod_exp_listCompute powmod for a list of exponents.
primesReturn a list of the first n primes.
repunit_factorFactor n using repunit properties. Returns (p, q) if found.
shorFactor n using Shor's algorithm (classical part). Returns (p, q) if found.
tonelliCompute the modular square root using Tonelli-Shanks algorithm. Returns x such that x^2 ≡ n (mod p).
trivial_factorization_with_n_phiFactor n given phi(n). Returns (p, q) if found, None otherwise.
wienerAttack RSA using Wiener's method given modulus n and public exponent e. Returns (p, q) if vulnerable.
williams_pp1Factor n using Williams' P+1 algorithm. Returns (p, q) if found.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan6 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 159 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Number Theory compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 82/100
- higher than 63% of 48,273 servers
- Tools
- 55
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 12
- more than 3% of 11,915 servers with a package
What its tools let an agent do: 54 read · 1 change
Install Number Theory in Claude Code, Cursor or VS Code
claude mcp add mcp-number-theory -- uvx mcp-number-theory
What the publisher says
From the Number Theory repository's README, as published. We do not edit it. Read it on GitHub
mcp-number-theory
MCP server exposing number theory functions and factorization algorithms.
Install
pip install mcp-number-theoryUsage
from mcp_number_theory import number_theory as nt
# Compute GCD
result = nt.gcd(48, 18) # Returns 6
# Factorize
from mcp_number_theory import algos
p, q = algos.fermat(1234567890123456789)MCP Server
This package provides an MCP server that exposes number theory functions. Run with:
mcp-number-theorymcp-name: io.github.daedalus/mcp-number-theory
Nothing above is checked by us. What we check is on the safety report.
Number Theory: common questions
- Is Number Theory MCP server safe?
- Mostly: it is graded B (82/100). Read the Number Theory safety report
- How do I install Number Theory?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Number Theory need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Number Theory maintained?
- The last commit was 195 days ago (2026-04-21). The latest release is v0.1.0.
- How does Number Theory compare with other MCP servers?
- safety score 82/100 (higher than 63% of 48,273 servers); tools 55 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.