MCP server exposing cypari2 (PARI/GP) number theory library
Project description
mcp-parigp
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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_parigp-0.1.0.tar.gz.
File metadata
- Download URL: mcp_parigp-0.1.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d77786696ec5d7d3ba22c472e858d58b84ec63b7b170f62815c116934ebbd9ad
|
|
| MD5 |
2ac3f2448f6e8acec4a69858daf30bed
|
|
| BLAKE2b-256 |
8672d3fed9d285830cbcd7f91fa9557963fbc0dbec85c9c94414303f913eb241
|
Provenance
The following attestation bundles were made for mcp_parigp-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on daedalus/mcp-parigp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_parigp-0.1.0.tar.gz -
Subject digest:
d77786696ec5d7d3ba22c472e858d58b84ec63b7b170f62815c116934ebbd9ad - Sigstore transparency entry: 1197329692
- Sigstore integration time:
-
Permalink:
daedalus/mcp-parigp@c299ef3d4ceae5d78e5ac9a3514511b4bbf4e9cb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c299ef3d4ceae5d78e5ac9a3514511b4bbf4e9cb -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_parigp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_parigp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04171dbb7dc16a580bde5486c653104ee9f63c7952017c65176a0df4c5105ee7
|
|
| MD5 |
456055670601240acd71e67488688e4f
|
|
| BLAKE2b-256 |
7945aff3b8f325a2298db2ba35df327f7926dd7af376b123b2c2457b5f84145a
|
Provenance
The following attestation bundles were made for mcp_parigp-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on daedalus/mcp-parigp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_parigp-0.1.0-py3-none-any.whl -
Subject digest:
04171dbb7dc16a580bde5486c653104ee9f63c7952017c65176a0df4c5105ee7 - Sigstore transparency entry: 1197329701
- Sigstore integration time:
-
Permalink:
daedalus/mcp-parigp@c299ef3d4ceae5d78e5ac9a3514511b4bbf4e9cb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c299ef3d4ceae5d78e5ac9a3514511b4bbf4e9cb -
Trigger Event:
release
-
Statement type: