io.github.daedalus/mcp-parigp

Official registry Other

MCP server exposing cypari2 (PARI/GP) number theory library

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package mcp-parigp
Claude Code
claude mcp add mcp-parigp -- uvx mcp-parigp==0.1.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mcp-parigp": {
            "command": "uvx",
            "args": [
                "mcp-parigp==0.1.0"
            ]
        }
    }
}

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. mcp-parigp
  2. Install
  3. Usage
  4. API
  5. Development

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 integer
  • isprime(n) - Test if n is prime
  • gcd(a, b) - Greatest common divisor
  • phi(n) - Euler's totient function
  • sigma(n, k) - Sum of k-th power of divisors
  • jacobi(a, n) - Jacobi symbol
  • znorder(x, n) - Multiplicative order modulo n
  • primes(n) - First n primes
  • nextprime(n) - Next prime after n
Polynomials
  • polroots(pol) - Find roots of polynomial
  • polcyclo(n) - n-th cyclotomic polynomial
  • deriv(pol) - Derivative of polynomial
  • subst(pol, v, expr) - Substitute in polynomial
Number Fields
  • nfinit(pol) - Initialize number field
  • bnfinit(pol) - Initialize with Buchmann's algorithm
  • idealadd(nf, a, b) - Add ideals
  • idealmul(nf, a, b) - Multiply ideals
Elliptic Curves
  • ellinit(eq) - Initialize elliptic curve
  • ellap(E, p) - Trace of Frobenius at p
  • elltors(E) - Torsion subgroup
  • ellheight(E, P) - Canonical height
Matrices
  • matid(n) - n×n identity matrix
  • matdet(m) - Matrix determinant
  • matinv(m) - Matrix inverse
  • matrank(m) - Matrix rank
Elementary Functions
  • sin, cos, tan, asin, acos, atan
  • sinh, cosh, tanh, asinh, acosh, atanh
  • exp, log, sqrt, abs
  • pi(), 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/

Frequently asked questions

What is io.github.daedalus/mcp-parigp?

MCP server exposing cypari2 (PARI/GP) number theory library

How do I install io.github.daedalus/mcp-parigp?

It runs on your machine. In Claude Code: claude mcp add mcp-parigp -- uvx mcp-parigp==0.1.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.daedalus/mcp-parigp need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is io.github.daedalus/mcp-parigp open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.daedalus/mcp-parigp?

It is published by daedalus. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.