Mcp Parigp

io.github.daedalus由 GitHub 帳號 daedalus 發布v0.1.0更新於 Nov 10, 2026

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

已驗證STDIO僅桌面AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 伺服器,封裝 cypari2(PARI/GP)數論函式庫,讓助理執行精確的數學運算。

可以做什麼
  • 整數分解、質性判定,以及最大公因數、歐拉函數、除數和、雅可比符號、階與質數序列
  • 多項式運算:求根、建構分圓多項式、微分與代換
  • 數體及其理想的初始化與運算,橢圓曲線初始化及 Frobenius 跡、撓子群與高度
  • 矩陣運算:單位矩陣、行列式、反矩陣與秩
  • 計算初等三角函數、雙曲函數、指數、對數及常數
適用情境
適合助理需要精確或符號化的數論與代數結果時使用,例如整數分解、質性檢定、多項式與數體計算、橢圓曲線,而非近似數值答案。
執行需求
以本機程序在桌面執行,透過 pip 從 PyPI 安裝 mcp-parigp,並以 mcp-parigp 指令啟動;相依於 cypari2/PARI 函式庫。未宣告任何帳號、API 金鑰、環境變數或標頭。
安裝前請注意
不涉及憑證或寫入操作。大整數分解、數體初始化或橢圓曲線運算等重度計算可能很慢且耗用大量 CPU,超大輸入可能讓助理的工具呼叫長時間沒有回應。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Parigp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-parigp

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

[PyPI] [Python] [Coverage] [Ruff]

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

Install

bash
pip install mcp-parigp

Usage

As MCP Server

Run directly:

bash
mcp-parigp

Or use with an MCP client by configuring in your settings:

json
{  "mcpServers": {    "mcp-parigp": {      "command": "mcp-parigp"    }  }}

In Python

python
from mcp_parigp import eval_expression, factor, isprime
# Evaluate PARI/GP expressionsresult = eval_expression("factor(100)")print(result)  # [[2, 2], [5, 2]]
# Factor integersprint(factor(100))  # [[2, 2], [5, 2]]
# Test primalityprint(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

bash
git clone https://github.com/daedalus/mcp-parigp.gitcd mcp-parigppip install -e ".[test]"
# run testspytest
# formatruff format src/ tests/
# lintruff check src/ tests/
# type checkmypy src/

來源:README.md,提交 3a8a1b6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分