mcp-parigp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-parigpfactor 123456789012345"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-parigp
MCP server exposing cypari2 (PARI/GP) number theory library
mcp-name: io.github.daedalus/mcp-parigp
Install
pip install mcp-parigpRelated MCP server: mcp-sympy
Usage
As MCP Server
Run directly:
mcp-parigpOr 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)) # TrueAPI
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/Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/daedalus/mcp-parigp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server