# agmonetti/mathmethods-mcp [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/agmonetti/mathmethods-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 257  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agmonetti-mathmethods-mcp

## Description
Numerical methods: root finding, numerical integration, differential equations (RK4) and Lagrange interpolation.

## Tools
Capabilities this server exposes over MCP:

- **root_bisection** — Bisection on `[a, b]` (sign change or endpoint root)
- **root_newton_raphson** — Newton–Raphson with numeric derivative
- **root_punto_fijo** — Fixed-point iteration `x = g(x)
- **root_aitken** — Aitken Δ² acceleration of fixed point
- **root_comparar** — All four methods compared on the same problem
- **integral_rectangulo** — Composite midpoint rule
- **integral_trapecio** — Composite trapezoidal rule
- **integral_simpson13** — Composite Simpson 1/3 (n even)
- **integral_simpson38** — Composite Simpson 3/8 (n multiple of 3)
- **integral_comparar** — All four rules compared (n multiple of 6)
- **finite_differences** — Forward/backward/central 1st & 2nd derivatives
- **ode_rk4** — Runge–Kutta 4 (4th order)
- **ode_heun** — Heun predictor–corrector (2nd order)
- **ode_euler** — Explicit Euler (1st order)
- **interpolation_lagrange** — Lagrange interpolating polynomial
- **mc_hit_or_miss_1d** — Hit-or-miss estimator (correct for sign-changing f)
- **mc_valor_promedio_1d** — Mean-value estimate of `∫ₐᵇ f(x) dx
- **mc_valor_promedio_2d** — Mean-value estimate of a double integral
- **mc_valor_promedio_3d** — Mean-value estimate of a triple integral
- **mc_estadistico_1d** — M×N replicated experiment with statistical analysis
- **mc_convergencia_1d** — Running average showing the estimate converging
- **dynamic_1d_solve** — Equilibria, stability, phase portrait and time series
- **dynamic_1d_equilibria** — Find and classify the equilibria of `x' = f(x)
- **dynamic_1d_bifurcation** — Equilibria vs parameter (bifurcation diagram)
- **dynamic_2d_linear_solve** — Linear `X' = A·X + B`: classification, eigenvalues, analytic solution
- **dynamic_2d_nonlinear_solve** — Nonlinear `x' = f(x,y)`: equilibria, Jacobian, nullclines
- **dynamic_2d_conservative_solve** — Divergence-free check, Hamiltonian/energy, closed orbits
- **dynamic_2d_lanchester_solve** — Lanchester combat model with analytic time-to-annihilation
- **dynamic_2d_nonhomogeneous_solve** — Non-homogeneous `X' = A·X + B(t)` with time-varying forcing

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mathmethods-mcp": {
    "command": "npx",
    "args": ["-y","@agmonetti/mathmethods-mcp"]
  }
}
```

## Documentation

## What agmonetti/mathmethods-mcp does

agmonetti/mathmethods-mcp makes a collection of numerical-analysis routines available as Model Context Protocol tools. Its scope includes four root-finding approaches, several quadrature rules, numerical differentiation, initial-value ODE solvers, Lagrange interpolation, Monte Carlo estimators, and dynamical-system analysis.

The dynamic-system tools extend beyond numerical stepping. They can find and classify one-dimensional equilibria, inspect bifurcations, analyze linear and nonlinear two-dimensional systems, check conservative behavior, solve a Lanchester combat model, and handle non-homogeneous linear systems with time-dependent forcing.

## How it works

The server runs over the standard MCP server workflow and can be launched on demand with `npx`, installed as a global npm command, or started through Python's `uvx`. Its mathematical core is included in the repository, so the server does not depend on a separately checked-out academic project at runtime.

Expressions use Python/SymPy conventions such as `x**2`, `sin(x)`, `exp(x)`, `sqrt(x)`, and `log(x)`. Common alternatives including `e^x`, `sen(x)`, `ln(x)`, and `^` for exponentiation are also accepted. Tools can return structured JSON results. Each tool also accepts a `plot` option; when enabled, the response can include a rendered PNG MCP image content block in addition to the JSON.

## Setup and configuration

The npm package can be registered with Claude Code using:

```bash
claude mcp add mathmethods npx -y @agmonetti/mathmethods-mcp
```

Claude Desktop and Cursor can use an MCP entry whose command is `npx` and whose arguments are `-y` and `@agmonetti/mathmethods-mcp`. A global installation provides the `mathmethods-mcp` command directly. Python-oriented clients can launch `uvx mathmethods-mcp` instead. For local development, clone the repository, install its dependencies with `uv sync --extra dev`, and run `uv run server.py`.

Plotting is an optional dependency. Install the `viz` extra with pip, uvx, or the checkout's uv environment before requesting `plot=True`. Without it, a plotting request returns an installation error rather than a plot. Clients that cannot display MCP images still receive the JSON response.

## Tools and capabilities

- Root finding: bisection, Newton–Raphson with a numerical derivative, fixed-point iteration, Aitken acceleration, and side-by-side comparison.
- Integration: composite midpoint, trapezoidal, Simpson 1/3, Simpson 3/8, and comparison of the four rules.
- Differentiation and interpolation: forward, backward, and central first- and second-order finite differences, plus Lagrange interpolation.
- ODE solving: explicit Euler, Heun predictor–corrector, and fourth-order Runge–Kutta.
- Monte Carlo: one-, two-, and three-dimensional mean-value estimates, one-dimensional hit-or-miss estimation, replicated statistical experiments, and convergence tracking.
- Dynamical systems: equilibrium and stability analysis, phase portraits, time series, bifurcation diagrams, nullclines, eigenvalues, analytic linear solutions, energy behavior, and Lanchester-model analysis.

Several comparison tools impose method-specific interval-count requirements: Simpson 1/3 needs an even count, Simpson 3/8 needs a count divisible by three, and the combined integration comparison needs a count divisible by six.

## Limitations and notes

Plot output requires the optional Matplotlib-based visualization extra and a client capable of displaying MCP image content. The hit-or-miss one-dimensional estimator is described as correct for sign-changing functions. Mathematical expressions are processed through the server's expression-validation layer, so callers should use the supported syntax and function names rather than arbitrary programming expressions.

_Full upstream README: https://allmcps.com/mcp/agmonetti-mathmethods-mcp/readme_

