daedalus/mcp-parigp
MCP server exposing cypari2 (PARI/GP) number theory library
Platform-specific configuration:
{
"mcpServers": {
"mcp-parigp": {
"command": "npx",
"args": [
"-y",
"mcp-parigp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
> MCP server exposing cypari2 (PARI/GP) number theory library
[](https://pypi.org/project/mcp-parigp/) [](https://pypi.org/project/mcp-parigp/) [](https://codecov.io/gh/daedalus/mcp-parigp) [](https://github.com/astral-sh/ruff)
mcp-name: io.github.daedalus/mcp-parigp
pip install mcp-parigpRun directly:
mcp-parigpOr use with an MCP client by configuring in your settings:
{
"mcpServers": {
"mcp-parigp": {
"command": "mcp-parigp"
}
}
}from mcp_parigp import eval_expression, factor, isprime
# Evaluate PARI/GP expressions
result = eval_expression("factor(100)")
print(result) # [[2, 2], [5, 2]]
# Factor integers
print(factor(100)) # [[2, 2], [5, 2]]
# Test primality
print(isprime(29)) # Truefactor(n) - Factor an integerisprime(n) - Test if n is primegcd(a, b) - Greatest common divisorphi(n) - Euler's totient functionsigma(n, k) - Sum of k-th power of divisorsjacobi(a, n) - Jacobi symbolznorder(x, n) - Multiplicative order modulo nprimes(n) - First n primesnextprime(n) - Next prime after npolroots(pol) - Find roots of polynomialpolcyclo(n) - n-th cyclotomic polynomialderiv(pol) - Derivative of polynomialsubst(pol, v, expr) - Substitute in polynomialnfinit(pol) - Initialize number fieldbnfinit(pol) - Initialize with Buchmann's algorithmidealadd(nf, a, b) - Add idealsidealmul(nf, a, b) - Multiply idealsellinit(eq) - Initialize elliptic curveLoading reviews...