Skip to main content
Glama
daedalus

mcp-parigp

by daedalus

mcp-parigp

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

PyPI Python Coverage Ruff

mcp-name: io.github.daedalus/mcp-parigp

Install

pip install mcp-parigp

Related MCP server: mcp-sympy

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/
Install Server
A
license - permissive license
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Enables mathematical operations and calculations through an MCP server interface. Provides computational capabilities accessible via HTTP endpoints for mathematical processing tasks.
    MIT
  • A
    license
    C
    quality
    C
    maintenance
    An MCP server that provides access to SymPy's symbolic mathematics library for advanced algebraic computations. It enables users to perform complex tasks such as symbolic simplification, calculus, equation solving, matrix operations, and number theory.
    100
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A Python-based MCP server providing mathematical computation tools and plotting utilities for a wide range of math topics including calculus, matrix operations, statistics, and more.
    22
    5
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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