primes-mcp

v1.0.1
io.github.mrfentmen/primes-mcp Checked 1 day ago Published 1 month ago

Prime testing, factorisation and searches offline with BigInt: Miller-Rabin and Pollard rho

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

is_prime

Test whether a whole number is prime with deterministic Miller-Rabin up to 10^30.

ParameterTypeDescription
n *stringWhole number, decimal or 0x hex, e.g. "170141183460469231731687303715884105727"

factorise

Factorise a number into primes using trial division and Pollard rho, with powers grouped.

ParameterTypeDescription
n *stringWhole number up to 10^24

primes_in_range

Find every prime in a numeric range with a segmented sieve.

ParameterTypeDescription
from *integerStart of the range
to *integerEnd of the range, up to 20000000
limitintegerPrimes to list, default 50

next_prime

The next prime strictly above a number, with the gap.

ParameterTypeDescription
n *stringWhole number, decimal or 0x hex