Parigp
FreeNot checkedMCP server that exposes the PARI/GP number theory library, enabling advanced mathematical computations like factorization, primality testing, polynomial root fi
About
MCP server that exposes the PARI/GP number theory library, enabling advanced mathematical computations like factorization, primality testing, polynomial root finding, and elliptic curve operations.
README
MCP server exposing cypari2 (PARI/GP) number theory library
mcp-name: io.github.daedalus/mcp-parigp
Install
pip install mcp-parigp
Usage
As MCP Server
Run directly:
mcp-parigp
Or use with an MCP client by configuring in your settings:
{
"mcpServers": {
"mcp-parigp": {
"command": "mcp-parigp"
}
}
}
In Python
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)) # True
API
Number Theory
factor(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 n
Polynomials
polroots(pol)- Find roots of polynomialpolcyclo(n)- n-th cyclotomic polynomialderiv(pol)- Derivative of polynomialsubst(pol, v, expr)- Substitute in polynomial
Number Fields
nfinit(pol)- Initialize number fieldbnfinit(pol)- Initialize with Buchmann's algorithmidealadd(nf, a, b)- Add idealsidealmul(nf, a, b)- Multiply ideals
Elliptic Curves
ellinit(eq)- Initialize elliptic curveellap(E, p)- Trace of Frobenius at pelltors(E)- Torsion subgroupellheight(E, P)- Canonical height
Matrices
matid(n)- n×n identity matrixmatdet(m)- Matrix determinantmatinv(m)- Matrix inversematrank(m)- Matrix rank
Elementary Functions
sin,cos,tan,asin,acos,atansinh,cosh,tanh,asinh,acosh,atanhexp,log,sqrt,abspi(),euler(),I()
Development
git clone https://github.com/daedalus/mcp-parigp.git
cd mcp-parigp
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
Install Parigp in Claude Desktop, Claude Code & Cursor
unyly install mcp-parigpInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add mcp-parigp -- uvx mcp-parigpFAQ
Is Parigp MCP free?
Yes, Parigp MCP is free — one-click install via Unyly at no cost.
Does Parigp need an API key?
No, Parigp runs without API keys or environment variables.
Is Parigp hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Parigp in Claude Desktop, Claude Code or Cursor?
Open Parigp on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Parigp with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
