Mcp Sympy

io.github.daedalus由 GitHub 账号 daedalus 发布v0.1.0更新于 Oct 25, 2026

MCP server that exposes SymPy's symbolic mathematics functionality

已验证STDIO仅桌面AI 与机器学习

概览

AI 生成的概览

一个本地 MCP 服务器,开放 SymPy 的符号数学能力,让助手进行化简、求解、求导、积分等精确符号计算。

可以做什么
化简、展开和因式分解符号表达式,定义符号并通过 sympify 将字符串转为 SymPy 表达式。进行微积分计算:导数、积分、极限和级数。求解方程与方程组,包括数值求解和微分方程求解。处理矩阵:运算、逆、行列式和特征值。使用三角函数、特殊函数、数论和集合,并将结果输出为 LaTeX、MathML 或 Python 代码。
适用场景
适合助手需要精确符号数学而非浮点近似时使用:代数化简、方程求解、微积分、矩阵运算、数论,或生成用于文档的 LaTeX 输出。
运行要求
作为本地进程在用户机器上运行,通过 pip 从 PyPI 安装(mcp-sympy),并以 mcp-sympy 命令启动。未声明认证、环境变量或请求头。仅限桌面端,不可在网页中执行。
安装前请注意
未显示需要凭据、付款或写入数据的操作。计算在本地进行,结果取决于 SymPy 库的正确性;重要的符号结果应自行核验。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Sympy,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-sympy

MCP server that exposes SymPy's symbolic mathematics functionality

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

Install

bash
pip install mcp-sympy

MCP Server

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

Usage

As MCP Server

Configure in your MCP client:

json
{  "mcpServers": {    "mcp-sympy": {      "command": "mcp-sympy",      "env": {}    }  }}

Python API

python
from mcp_sympy import tools
# Simplify expressionsresult = tools.sympy_simplify("sin(x)**2 + cos(x)**2")print(result)  # "1"
# Solve equationsresult = tools.sympy_solve("x**2 - 4", "x")print(result)  # "[2, -2]"
# Differentiateresult = tools.sympy_diff("x**2", "x")print(result)  # "2*x"
# Integrateresult = tools.sympy_integrate("x**2", "x")print(result)  # "x**3/3"
# Create matricesresult = tools.sympy_matrix("1,2; 3,4")print(result)  # "Matrix([[1, 2], [3, 4]])"
# Number theoryresult = tools.sympy_isprime("7")print(result)  # "True"

Available Tools

The MCP server exposes comprehensive SymPy functionality including:

  • Symbolic Expressions: symbols, sympify, simplify, expand, factor
  • Calculus: diff, integrate, limit, series, Derivative, Integral
  • Solving: solve, solveset, nsolve, diophantine, dsolve
  • Matrices: Matrix operations, inverse, determinant, eigenvalues
  • Trigonometry: sin, cos, tan, and their inverses
  • Special Functions: gamma, zeta, erf, fibonacci, etc.
  • Number Theory: isprime, prime, gcd, lcm, totient
  • Sets: FiniteSet, Interval, Union, Intersection
  • Logic: And, Or, Not, Xor
  • Printing: LaTeX, MathML, Python code

Development

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

License

MIT License - see LICENSE file.

来源:README.md,提交 83530c0

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分