sci-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sci-mcp find the derivative of x^3*sin(x) with respect to x"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sci-mcp
本机科学计算 MCP 服务器。把符号数学、物理单位、数值仿真、PDE、统计推断、GLM/时间序列、 信号时频分析、小波、蒙特卡洛、规划求解、高层数据分析和绘图收进一套固定的 MCP 工具里, 供 Cherry Studio 里的 agent 直接调用。
工具一览(65 个)
符号数学(sympy)
工具 | 作用 |
| 求导、不定积分、极限、级数展开、化简、展开、因式分解 |
| 解方程/方程组;单变量返回扁平解列表,多变量返回字典列表 |
| 符号表达式数值代入并求值 |
| 符号 ODE 解析解(通解或带初值),支持高阶方程 |
向量微积分
工具 | 作用 |
| 梯度、散度、旋度(三维)、拉普拉斯算子 |
物理与单位(scipy.constants + pint)
工具 | 作用 |
| 查询物理常量 |
| 单位换算,支持偏移单位 |
| 计算带单位表达式 |
数值仿真(numpy + scipy)
工具 | 作用 |
| 一阶 ODE 系统数值解 |
| 局部最小化,支持上下界 + 等式/不等式约束 |
| 全局优化:差分进化、模拟退火、basinhopping |
| det/inv/eig/svd/solve/lstsq/matmul/rank/norm/transpose |
| 数值求根(brentq / newton) |
| 单边幅度谱与主频 |
| 一维插值 |
| 稀疏矩阵:solve/eigsh/svds/matmul/transpose/norm,支持 Matrix Market、直接法/CG/GMRES |
PDE(有限差分)
工具 | 作用 |
| 一维热方程;边界支持 Dirichlet / Neumann / Robin |
| 一维波动方程;边界支持 Dirichlet / Neumann / Robin |
| 二维拉普拉斯方程,Dirichlet 边界,Gauss-Seidel |
PDE 进阶(三维 / 非线性)
工具 | 作用 |
| 三维热方程,显式 FTCS(稳定性检查) |
| 三维拉普拉斯方程,向量化 Jacobi 迭代 |
| 一维 Burgers 方程(非线性对流 + 扩散) |
| 一维变系数热传导 alpha(x) |
| 半通用一维显式 PDE:u_t = F(x,t,u,u_x,u_xx) |
| 三维波动方程(显式中心差分) |
| 二维不可压涡量-流函数(周期边界) |
统计与绘图(scipy.stats + matplotlib)
工具 | 作用 |
| 描述统计 |
| 概率分布 pdf/cdf/ppf/rvs/fit |
| 任意表达式模型最小二乘拟合 + R² |
| line/scatter/hist/bar/errorbar/contour/surface |
统计推断
工具 | 作用 |
| 单样本 / 双样本 / 配对 t 检验 |
| 卡方独立性 / 拟合优度 |
| 单因素方差分析 |
| Pearson / Spearman / Kendall |
| 单变量或多变量 OLS |
GLM 与时间序列(statsmodels)
工具 | 作用 |
| 广义线性模型:gaussian/binomial/poisson/gamma 等 |
| ARIMA 拟合与多步预测(含置信区间) |
| 趋势/季节/残差分解 |
| ADF 单位根 / 平稳性检验 |
混合模型(statsmodels)
工具 | 作用 |
| 线性混合模型:固定效应 + 随机效应,处理分组/重复测量 |
| 广义估计方程:gaussian/binomial/poisson × 三种相关工作结构 |
| 非线性混合模型(固定效应 + 随机截距,惩罚最小二乘近似) |
生存分析
工具 | 作用 |
| Cox 比例风险模型,含完全分离/不收敛检测 |
| Kaplan-Meier 生存曲线与中位生存期,支持分组 |
信号处理(scipy.signal)
工具 | 作用 |
| Butterworth 低通/高通/带通/带阻 |
| 一维卷积 |
| Welch 功率谱密度与峰值频率 |
| 峰值检测 |
| 短时傅里叶变换,时频矩阵 + 可选频谱图 |
小波(PyWavelets)
工具 | 作用 |
| 多层小波分解,返回各层能量与系数 |
| 小波阈值去噪(通用阈值 / 自定义阈值) |
随机模拟与规划
工具 | 作用 |
| 按分布抽样并计算表达式 |
| 线性规划(HiGHS) |
| 整数/混合整数规划(HiGHS) |
数据文件 IO
工具 | 作用 |
| 读写 CSV/TSV/TXT/JSON/NPY |
| 直接对文件列做统计或画图 |
高层工作流
工具 | 作用 |
| 读 CSV → 描述统计 + 相关矩阵 + 目标回归 + 图,一次完成 |
| ARIMA / 指数平滑多步预测,统一返回预测值与置信区间 |
兜底与健康检查
工具 | 作用 |
| 子进程执行任意 Python,预导入 numpy/scipy/sympy/matplotlib |
| 检查所有工具模块导入状态与注册函数数 |
Related MCP server: mma-mcp
启动
cd sci-mcp
uv run sci-mcp或直接用虚拟环境入口(Cherry Studio 注册时用这个):
.venv\Scripts\sci-mcp.exe传输方式为 stdio,无需端口。若 sci-mcp.exe 正被 Cherry 占用,开发时用 uv run --no-sync ...。
输出目录
绘图、PDE/时频/小波结果(.npz)、run_python 产物默认写到:
~/.sci-mcp/outputsWindows 下即 %USERPROFILE%\.sci-mcp\outputs。
可用环境变量 SCI_MCP_OUTPUT_DIR 覆盖。
数据约定
长数组单次最多返回 2000 个点;超出时等间隔降采样并标注
downsampled: true与原始长度。完整 PDE/时频/小波结果保存为
.npz,返回值里带path。数组参数支持文件引用
"@<path>"(绝对路径或相对输出目录),支持 CSV/TSV/TXT/JSON/NPY; 文本文件按行解析,一行一个值。NaN/Infinity不进入 JSON:统一转成null,顶层warnings说明被转换的字段。load_data读取上限 50 MB / 1,000,000 行;save_data、plot的文件名只允许 basename。
开发
uv run --no-sync pytest -qPython ≥ 3.12;依赖由
uv.lock锁定(numpy、scipy、sympy、matplotlib、pint、statsmodels、pandas、pywavelets)。所有工具返回统一信封:成功
{"ok": true, "result": ...},失败{"ok": false, "error": "..."}。工具函数不向外抛异常,错误统一走
core.err()。
扩展新工具
在 src/sci_mcp/tools/ 新建模块,按固定写法:
from ..core import ok, err
def my_tool(x: float) -> dict:
"""One-line English description shown to the model."""
try:
return ok(x * 2)
except Exception as e:
return err(f"my_tool failed: {e}")
def register(mcp) -> None:
mcp.tool()(my_tool)server.py 会自动发现该模块并注册,无需修改其他文件。
已知限制
run_python在本机子进程执行,不是安全沙箱;只适合可信代码。默认超时 30 秒(上限 300 秒), 超时会杀整棵进程树;代码上限 100,000 字符;Windows 下默认 2048 MiB 内存上限 (SCI_MCP_SANDBOX_MEMORY_MB可调,16–65536)。PDE 覆盖一维热/波(含 Neumann/Robin、变系数)、二维拉普拉斯、三维热/拉普拉斯/波动、 一维 Burgers、半通用一维显式 PDE、二维不可压 Navier-Stokes(周期边界); 仍不支持通用三维 CFD、湍流模型、复杂边界。
稀疏矩阵支持 solve/eigsh/svds/matmul/transpose/norm,求解器含直接法/CG/GMRES; 超大规模仍受 nnz / 内存上限约束。
混合模型含线性 MixedLM、GEE,以及非线性混合模型的惩罚最小二乘近似(非完整 NLME)。
生存分析只做 Cox 比例风险与 Kaplan-Meier;不含竞争风险、时变协变量。
统计推断是经典检验 + OLS + GLM/ARIMA,不含混合模型、生存分析。
monte_carlo按独立变量抽样,不建模变量间相关性。Gaussian GLM 的 McFadden 伪 R² 可能略大于 1(statsmodels 似然尺度所致)。
指数平滑的置信区间用残差正态近似(statsmodels 无解析区间),返回里已标注。
符号解中的复数根和无理表达式以 sympy 字符串返回。
integer_program的method仅支持highs。
Available Tools
65 toolsanalyze_datasetC
Profile a CSV file: numeric summaries, correlations, optional target regression and plots.
Inputs: path (required), plot, target, max_columns.
anovaB
Run a one-way ANOVA and return the F statistic, p value and degrees of freedom.
``groups`` is a nested list of samples; ``"@<path>"`` file references are
not supported for this parameter.
Inputs: groups (required).
arimaB
Fit an ARIMA model and optionally forecast.
``series`` may be an inline list or an ``"@<path>"`` file reference.
``forecast_steps`` is limited to 0..10000; ``conf_alpha`` must be in (0, 1).
Inputs: series (required), order, conf_alpha, forecast_steps, +1 more.
chi2_testB
Run a chi-square goodness-of-fit test (1-D) or independence test (2-D table).
Inputs: observed (required), expected.
convolveC
Compute the discrete convolution of two signals with numpy.convolve.
Inputs: signal1 (required), signal2 (required), mode.
correlationA
Compute the Pearson, Spearman or Kendall correlation coefficient and its p value.
``x`` and ``y`` may be passed inline or as ``"@<path>"`` file references.
Inputs: x (required), y (required), method.
cox_regressionB
Fit a Cox proportional hazards regression with statsmodels PHReg.
``formula`` contains only the covariate terms (for example ``"x1 + x2"``).
``data`` is a ``{column: list}`` mapping or an ``"@<path>.csv"`` reference.
Event indicators must be 0/1 and durations must be positive.
Inputs: data (required), formula (required), event_col (required), duration_col (required).
curlC
Compute the curl of a 3-dimensional vector field.
Inputs: field (required), variables (required).
curve_fitC
Fit y = model(x) to data with scipy.optimize.curve_fit using a sympy-parsed expression.
Inputs: model (required), xdata (required), ydata (required), p0, +1 more.
describeB
Return descriptive statistics (mean, sample std, quartiles, skew, kurtosis) for a sample.
Inputs: data (required).
describe_fileC
Describe one numeric column of a CSV/TSV/TXT/JSON/NPY file.
Inputs: path (required), column.
distributionC
Evaluate pdf/cdf/ppf/rvs or fit a scipy.stats distribution by attribute name.
Inputs: dist (required), operation (required), n, x, +3 more.
divergenceC
Compute the divergence of a vector field with respect to the given variables.
Inputs: field (required), variables (required).
dsolve_odeC
Solve an ODE analytically with sympy.dsolve, optionally with initial conditions.
Inputs: equation (required), x, y, ics.
fft_analysisC
Compute the single-sided amplitude spectrum of a real signal via numpy rfft.
Inputs: signal (required), sample_rate.
filter_signalB
Filter a signal with a Butterworth design and zero-phase filtfilt.
``kind`` is lowpass, highpass, bandpass or bandstop. ``cutoff`` is in Hz;
lowpass/highpass take a scalar and bandpass/bandstop take ``[low, high]``.
Inputs: kind (required), cutoff (required), signal (required), sample_rate (required), +1 more.
find_peaksC
Find local maxima in a signal, optionally filtered by height, distance or prominence.
Inputs: signal (required), height, distance, prominence.
find_rootsB
Find a scalar root of an expression using brentq (bracket) or Newton's method (x0).
Inputs: expr (required), x0, params, bracket, +1 more.
forecastB
Forecast a univariate series with ARIMA or Holt-Winters exponential smoothing.
ARIMA uses the given ``order`` (default ``[1, 0, 0]``); when
``seasonal_period`` is set the seasonal order is ``[1, 0, 0, period]``.
Exponential smoothing uses an additive trend and, when a period is given,
an additive seasonal component. ARIMA intervals are analytic; exponential
smoothing intervals are a normal approximation from the residual standard
deviation.
Inputs: series (required), order, steps, method, +2 more.
geeB
Fit a generalized estimating equation model.
``data`` is either a ``{column: list}`` mapping or an ``"@<path>.csv"``
reference. ``groups`` names the clustering column. ``family`` is one of
gaussian, binomial or poisson; ``cov_struct`` is one of independence,
exchangeable or autoregressive.
Returns population-averaged coefficients with robust standard errors,
z values and p values.
Inputs: data (required), groups (required), formula (required), family, +1 more.
glmB
Fit a generalized linear model from a formula and a data table.
``family`` is one of gaussian, binomial, poisson, gamma, inverse_gaussian
or negativebinomial. ``data`` is either a ``{column: list}`` mapping or an
``"@<path>.csv"`` reference (relative paths resolve against ``output_dir()``).
Inputs: data (required), family (required), formula (required).
global_optimizeB
Minimize a scalar expression with a global optimizer.
Variables are named ``x0, x1, ...`` in the order of ``bounds`` (or ``x0``).
``method`` is ``differential_evolution`` or ``dual_annealing`` (both require
finite ``bounds``) or ``basinhopping`` (requires a starting point ``x0``).
Keys of ``params`` are injected as additional symbolic constants.
Inputs: objective (required), x0, seed, bounds, +3 more.
gradientC
Compute the gradient of a scalar expression with respect to the given variables.
Inputs: expr (required), variables (required).
health_checkA
Report tool module import status and the current tool surface.
Inputs: no named parameters.
integer_programC
Minimize c @ x with scipy.optimize.milp (mixed-integer linear programming).
``integrality`` uses 1 for integer and 0 for continuous variables and
defaults to all-integer. ``fun`` is the minimum objective value; negate
``c`` to maximize. Default bounds are ``0 <= x <= inf``.
Inputs: c (required), a_eq, a_ub, b_eq, +4 more.
interpolate_1dC
Interpolate y(x) at points xi using scipy interp1d (linear/quadratic/cubic).
Inputs: x (required), y (required), xi (required), kind.
kaplan_meierB
Estimate survival curves with the Kaplan-Meier product-limit method.
``durations`` and ``events`` may be inline lists or ``"@<path>"`` references.
``groups`` optionally supplies one group label per observation (inline list
or ``"@<path>"`` file); when given, a separate curve is returned per group.
Inputs: events (required), durations (required), groups.
laplacianB
Compute the Laplacian of a scalar expression as the sum of second derivatives.
Inputs: expr (required), variables (required).
linear_programB
Minimize c @ x subject to linear inequality/equality constraints.
``fun`` is the minimum objective value; negate ``c`` to maximize. Default
bounds are scipy's ``(0, None)`` (all variables non-negative).
Inputs: c (required), a_eq, a_ub, b_eq, +3 more.
linear_regressionA
Fit an ordinary least-squares regression, simple or multiple, and report coefficient inference.
``x`` and ``y`` may be passed inline or as ``"@<path>"`` file references;
a file for ``x`` may contain a one- or two-dimensional array.
Inputs: x (required), y (required), feature_names.
load_dataC
Load a CSV/TSV/TXT/JSON/NPY file and return its shape, preview, summary and data.
Inputs: path (required), column, max_rows.
matrix_computeC
Perform a dense linear-algebra operation on matrix a (and optional b).
Inputs: a (required), operation (required), b.
mixed_lmA
Fit a linear mixed-effects model with a random-effects structure.
``data`` is either a ``{column: list}`` mapping or an ``"@<path>.csv"``
reference (relative paths resolve against ``output_dir()``). ``groups``
names the grouping column. ``re_formula`` optionally describes the random
effects (e.g. ``"~1"`` for random intercepts only). ``reml`` selects REML
(default) or maximum likelihood.
Returns fixed-effect estimates with standard errors, z values and p values,
the random-intercept variance, AIC/BIC and the convergence flag.
Inputs: data (required), groups (required), formula (required), reml, +1 more.
monte_carloC
Sample distributions with scipy.stats and evaluate a sympy expression over the samples.
``variables`` maps each symbol used in ``expression`` to a dict whose ``dist``
entry names a scipy.stats distribution; the remaining entries are passed to
``dist.rvs`` as keyword arguments (``uniform`` additionally accepts
``low``/``high``). The same ``seed`` always reproduces the same output.
Inputs: variables (required), expression (required), n, seed, +3 more.
nonlinear_mixed_lmA
Fit a nonlinear model with one random intercept per group, approximately.
The model is ``y = f(x; params) + b_g + error`` where ``b_g`` is a random
intercept shared by the observations of group ``g``. ``model`` is a sympy
expression in ``x`` (the independent-variable name is always ``x``, taken
from the column named by the ``x`` argument) and the parameter names given
by the keys of ``p0``.
``data`` is either a ``{column: list}`` mapping or an ``"@<path>.csv"``
reference (relative paths resolve against ``output_dir()``). ``groups``,
``x`` and ``y`` are column names. All fixed parameters and every ``b_g``
are optimized together with ``scipy.optimize.least_squares``, minimizing
``sum((y - f(x; params) - b_g)^2) + penalty * sum(b_g^2)``. Setting
``random_effect=False`` drops the ``b_g`` terms and returns no
``random_effects`` field.
This is a **penalized least-squares approximation**, not a full nonlinear
mixed-effects marginal-likelihood fit: random-effect variance components
are not estimated, there is no integration over random effects, and no
standard errors are produced. The response always carries
``approximation: true`` and an explanatory ``note``.
Inputs: x (required), y (required), p0 (required), data (required), +5 more.
optimize_minimizeA
Minimize a scalar expression with scipy.optimize.minimize.
Variables are named ``x0, x1, ...`` in the order of ``x0``. When ``method``
is omitted, SLSQP is used if ``constraints`` is given, otherwise L-BFGS-B
is used if ``bounds`` is given, otherwise scipy's default (BFGS).
Each constraint is ``{"kind": "ineq"|"eq", "expr": "..."}`` where ``expr``
is a sympy expression parsed with the variables and ``params``; ``ineq``
means ``expr >= 0`` and ``eq`` means ``expr == 0``.
Inputs: x0 (required), objective (required), bounds, method, +2 more.
physical_constantA
Look up a physical constant by alias, exact name, or keyword; return value, unit and uncertainty.
Inputs: query (required).
plotC
Render a line/scatter/hist/bar/errorbar/contour/surface plot to a PNG file.
Inputs: data (required), kind (required), dpi, title, +3 more.
plot_fileC
Plot columns from a CSV/TSV/TXT/JSON/NPY file to a PNG in the output directory.
Inputs: kind (required), path (required), x, y, +5 more.
power_spectrumC
Estimate the power spectral density with Welch's method.
Inputs: signal (required), sample_rate (required), nperseg.
run_pythonA
Execute Python code in a subprocess and return captured output plus produced files.
Resource controls: code is limited to 100,000 characters; stdout and stderr
are each truncated to 20,000 characters. On timeout the whole process tree
is terminated (Windows: ``taskkill /F /T``) and the error result carries the
output captured so far plus ``elapsed_seconds`` and changed ``files``.
On Windows the child (and its descendants) is assigned to a Job Object with
a per-process memory cap: 2048 MiB by default, overridable with the
environment variable ``SCI_MCP_SANDBOX_MEMORY_MB`` (16..65536). Exceeding
the cap surfaces as ``MemoryError`` in ``stderr``. If the Job Object cannot
be created or assigned, execution continues without a hard memory cap. On
non-Windows platforms no hard memory cap is applied (the standard library
``resource`` module is not available on Windows and no portable equivalent
is used); rely on ``timeout_seconds`` and the caller's own limits there.
Inputs: code (required), timeout_seconds.
save_dataC
Save numeric data as CSV, JSON or NPY under the configured output directory.
Inputs: data (required), filename (required), format, column_names.
solve_burgers_1dA
Solve u_t + uu_x = nuu_xx with explicit finite differences.
``u_x`` uses a centred difference and ``u_xx`` a second-order centred
difference. ``initial`` is an expression in x; the ends use the constant
Dirichlet values ``left`` and ``right``. The explicit scheme requires
dt <= dx^2/(2*nu) (diffusion) and dt <= dx/max|u| (CFL); a violation is
reported as an error with a hint to increase nt. The full (t, x) grid is
saved to .npz and returned downsampled to at most 20 space and 20 time
points.
Inputs: nu (required), nt, nx, left, +4 more.
solve_heat_1dA
Solve u_t = alpha*u_xx with explicit FTCS and configurable ends.
``nx`` is the number of spatial intervals (nx+1 grid points) and ``nt`` the
number of time steps. The scheme requires r = alpha*dt/dx^2 <= 0.5; larger
values are rejected as unstable. Each of ``left``/``right`` is either a
float (Dirichlet value) or a dict:
``{"type": "dirichlet", "value": v}``,
``{"type": "neumann", "flux": q}`` or
``{"type": "robin", "h": h, "ambient": a}``.
Sign conventions: ``flux`` is the x-derivative du/dx at the boundary, not
the outward-normal derivative. At the left end the outward normal is -x,
so the outward-normal derivative there is -flux; at the right end it is
+flux. The Robin condition uses the same x-derivative convention at both
ends: ``h*(u - ambient) + du/dx = 0`` (unit conductivity k), i.e.
``h*(u - ambient) - du/dn = 0`` on the left and
``h*(u - ambient) + du/dn = 0`` on the right. Neumann/Robin ends use ghost
nodes; Robin is applied at the new time level so that large h remains
stable. The full grid is saved as .npz, while the returned arrays are
downsampled to at most 100 spatial and 50 time points.
Inputs: nt (required), nx (required), alpha (required), t_end (required), +4 more.
solve_heat_1d_variableA
Solve u_t = d/dx(alpha(x) * du/dx) with an explicit flux scheme.
``alpha_expr`` is an expression in x and must be strictly positive on the
spatial grid. Face conductivities ``alpha(x_{i+1/2})`` and
``alpha(x_{i-1/2})`` are evaluated on half nodes, giving the conservative
flux form
u_i^{n+1} = u_i^n + dt/dx^2 * (
alpha_{i+1/2} (u_{i+1}^n - u_i^n)
- alpha_{i-1/2} (u_i^n - u_{i-1}^n))
The explicit scheme is rejected when ``dt * max(alpha) / dx^2 > 0.5``.
``nx`` is the number of intervals (nx+1 nodes), ``nt`` the number of time
steps. The ends use constant Dirichlet values. The full (t, x) grid is
saved to .npz; returned arrays are downsampled to at most 100 space and
50 time points.
Inputs: alpha_expr (required), nt, nx, left, +4 more.
solve_heat_3dA
Solve u_t = alpha*(u_xx + u_yy + u_zz) on the unit cube with explicit FTCS.
``nx``, ``ny``, ``nz`` are the number of intervals per axis (dx = 1/nx,
...) and ``nt`` the number of time steps. ``initial`` is an expression in
x, y and z; all six faces use the constant Dirichlet value ``boundary``.
The scheme requires r = alpha*dt/min(dx,dy,dz)^2 <= 1/6; larger values are
rejected as unstable. Grids above 500,000 cells are rejected. The full
(t, z, y, x) grid is saved to .npz; returned arrays are downsampled to at
most 20 points per dimension and 20 time points.
Inputs: nt (required), nx (required), ny (required), nz (required), +4 more.
solve_laplace_2dA
Solve u_xx + u_yy = 0 on the unit square with constant Dirichlet edges.
Red-black Gauss-Seidel is iterated until max|u_new-u_old| < tol. If
``max_iter`` is reached first the call still succeeds, with
``converged = False`` and the achieved ``iterations`` count. The full grid
is saved as .npz; the returned grid is downsampled to at most 100x100.
Inputs: nx (required), ny (required), top (required), left (required), +4 more.
solve_laplace_3dA
Solve u_xx + u_yy + u_zz = 0 on the unit cube with Dirichlet faces.
``x0``/``x1`` are the values on the faces x=0 and x=1 (likewise for y and
z). A vectorised Jacobi iteration is run until max|u_new-u_old| < tol; if
``max_iter`` is reached first the call still succeeds with
``converged = False`` and the achieved ``iterations``. Grids above 500,000
cells are rejected. The full (z, y, x) grid is saved to .npz and returned
downsampled to at most 20 points per axis.
Inputs: nx (required), ny (required), nz (required), x0, +7 more.
solve_odeB
Solve an initial-value ODE system with scipy solve_ivp.
``rhs`` is one expression (state variable ``y``) or a list of expressions
(state variables ``y0, y1, ...`` in the same order as ``y0``). The time
variable is ``t``; keys of ``params`` are injected as extra constants.
Inputs: y0 (required), rhs (required), t_span (required), method, +2 more.
solve_pde_1dA
Solve u_t = F(x, t, u, u_x, u_xx) with an explicit Euler scheme.
``equation`` is a sympy expression for ``F`` in the symbols ``x``, ``t``,
``u``, ``u_x`` and ``u_xx``. Spatial derivatives are second-order centred
differences evaluated on the interior nodes at every step; the ends keep
the constant Dirichlet values ``left``/``right``.
This is only a *semi-general* solver: no stability condition can be
derived for arbitrary ``F``. The result therefore always contains a
``stability_note`` recommending smaller steps or a specialized solver.
If a step produces a non-finite value the solver stops and returns
``err(...)`` with the offending step number.
The full (t, x) grid is saved to .npz; returned arrays are downsampled to
at most 100 space and 50 time points.
Inputs: equation (required), nt, nx, left, +4 more.
solve_wave_1dA
Solve u_tt = c^2*u_xx with explicit central differences.
``initial_displacement`` and ``initial_velocity`` are expressions in ``x``.
The Courant condition c*dt/dx <= 1 is enforced. Each of ``left``/``right``
is either a float (Dirichlet displacement) or a dict:
``{"type": "dirichlet", "value": v}``,
``{"type": "neumann", "flux": q}`` or
``{"type": "robin", "h": h, "ambient": a}``; boundary conditions act on the
displacement. ``flux`` is du/dx at the boundary (not the outward-normal
derivative): the left outward normal is -x so its outward-normal derivative
is -flux, while the right end's is +flux. Robin means
``h*(u - ambient) + du/dx = 0`` at both ends with the same x-derivative
convention (unit conductivity k). Neumann/Robin ends use ghost
nodes, with Robin applied at the new time level for stability at large h.
The full grid is saved as .npz, while the returned arrays are downsampled
to at most 100 spatial and 50 time points.
Inputs: c (required), nt (required), nx (required), t_end (required), +5 more.
solve_wave_3dA
Solve u_tt = c^2 (u_xx + u_yy + u_zz) on the unit cube.
``nx``, ``ny``, ``nz`` are the number of intervals per axis and ``nt`` the
number of time steps. The interior uses the explicit second-order central
scheme; the first time level uses the Taylor expansion
``u(dt) = u0 + dt*v0 + c^2*dt^2/2 * Laplacian(u0)``. All six faces use the
constant Dirichlet value ``boundary``.
Stability requires ``c*dt*sqrt(3)/min(dx,dy,dz) <= 1``. Grids above
500,000 cells and histories above 20,000,000 stored points are rejected.
The full (t, z, y, x) grid is saved to .npz; returned arrays are
downsampled to at most 20 points per spatial axis and 20 time points.
Inputs: c (required), nt (required), nx (required), ny (required), +5 more.
sparse_computeA
Compute with sparse matrices: info, solve, matmul, transpose, norm, eigsh or svds.
``a`` accepts ``{"rows", "cols", "values", "shape"}`` triplets, an
``@<path>.mtx`` Matrix Market file, or a dense two-dimensional list.
``b`` (solve/matmul) accepts a dense vector/matrix, a sparse triplet dict,
or an ``@<path>`` reference to .mtx/.npy/.csv/.tsv/.txt/.json data.
``solver`` applies to ``operation="solve"`` only: ``"direct"`` (default,
``spsolve``), ``"cg"`` (symmetric positive definite) or ``"gmres"``
(general square). Iterative solvers use a Jacobi preconditioner when every
diagonal entry is non-zero, honour ``tol`` as the relative residual
tolerance and ``maxiter`` as the iteration cap. Passing a non-direct
``solver`` with another operation returns ``err``. Solve results include
``"solver"``, ``"iterations"`` (``null`` for direct) and ``"residual"``
(``max(abs(a @ x - b))``).
Inputs: a (required), operation (required), b, k, +3 more.
stationarity_testB
Run the Augmented Dickey-Fuller test and report stationarity at 5%.
``regression`` is one of c, ct, ctt or n. ``autolag`` is AIC, BIC, t-stat
or None (no automatic lag selection).
Inputs: series (required), autolag, regression.
stftB
Compute a short-time Fourier transform and return the magnitude spectrogram.
The full magnitude matrix is saved as .npz when it exceeds 100 x 100 cells.
``save_spectrogram`` additionally renders a PNG with matplotlib (Agg).
Inputs: signal (required), sample_rate (required), window, nperseg, +3 more.
symbolic_calculusC
Perform symbolic calculus on an expression: diff, integrate, limit, series, simplify, expand, factor.
Inputs: expr (required), operation (required), order, point, +1 more.
symbolic_evaluateC
Substitute numeric or symbolic-constant values into an expression and evaluate it numerically.
Inputs: expr (required), substitutions (required).
symbolic_solveC
Solve one equation or a system of equations symbolically for the given variables.
Inputs: equations (required), variables (required).
time_series_decomposeB
Decompose a series into trend, seasonal and residual components.
``period`` must be at least 2 and smaller than the series length. The full
components are saved as ``.npz`` under ``output_dir()``; returned arrays are
evenly downsampled to at most 2000 points each.
Inputs: period (required), series (required), model.
t_testB
Run a one-sample, two-sample or paired t-test with an optional one-sided alternative.
Samples may be passed inline or as an ``"@<path>"`` file reference.
Inputs: sample1 (required), paired, popmean, sample2, +1 more.
unit_calculateC
Evaluate a unit-bearing arithmetic expression and return its value and unit.
Inputs: expression (required).
unit_convertB
Convert a numeric value between units, including offset units such as degC.
Inputs: value (required), to_unit (required), from_unit (required).
wavelet_denoiseC
Denoise a signal with wavelet shrinkage.
Detail coefficients are thresholded with :func:`pywt.threshold`. When
``threshold`` is omitted, the universal threshold ``sigma*sqrt(2*log(n))``
is used with ``sigma`` estimated from the finest detail coefficients via MAD.
Inputs: signal (required), mode, level, wavelet, +1 more.
wavelet_transformB
Decompose a signal with a discrete wavelet transform (pywt.wavedec).
The maximum level is used when ``level`` is omitted. Full coefficient arrays
are saved to a .npz file; the return value carries lengths, energies and a
short preview of each level.
Inputs: signal (required), mode, level, wavelet.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 65 tools
Several tool pairs have overlapping purposes (e.g., plot vs plot_file, describe vs describe_file, forecast vs arima, analyze_dataset vs component tools). Descriptions clarify file-based vs inline and general vs specific, but the volume of tools makes misselection likely. Most tools remain distinct enough for an expert agent.
All tool names use snake_case consistently, but the verb style is mixed: many are verb_noun (load_data, solve_heat_1d), while others are noun-only (arima, gradient, distribution). This is readable but lacks a single predictable pattern.
With 65 tools, the server far exceeds the recommended 3-15 range and even the 25+ threshold for 'too many'. While the scientific computing domain is broad, the tool count is excessive and likely to overwhelm an agent, with many tools that could be consolidated.
The surface covers a vast range of scientific computing tasks: data IO, statistics, PDE solvers, optimization, signal processing, symbolic math, and more. Minor gaps exist (e.g., no dedicated data manipulation tools), but run_python provides a workaround.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Related MCP Servers
- AlicenseCqualityDmaintenanceA multi-tool MCP server that enhances local LLMs with web search, document reading, scholarly research, Wikipedia access, and calculator functions. Provides comprehensive tools for information retrieval and computation without requiring API keys by default.221MIT
- AlicenseAqualityFmaintenanceAn MCP server that connects AI assistants to a local Wolfram Engine, enabling symbolic math, numerical analysis, and data visualization through Wolfram Language. It provides secure expression filtering, client authentication, and supports both local stdio and HTTP transports.232MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that exposes 8 mathematical tools (arithmetic, algebra, calculus, matrix operations, statistics, probability, unit conversions) to any MCP-compatible AI agent, enabling mathematical computations without code.815 npm1MIT
- AlicenseAqualityAmaintenanceAn MCP server that lets AI models run code in 31 languages, evaluate symbolic math and logic problems, and measure complexity—exposed as 48 tools for execution, session management, translation, optimization, and more.5152 PyPI5Apache 2.0