mathmethods-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HTTP_HOST | No | The host for the HTTP server when using streamable-http or sse. Defaults to 127.0.0.1. | 127.0.0.1 |
| MCP_HTTP_PORT | No | The port for the HTTP server when using streamable-http or sse. Defaults to 8000. | 8000 |
| MCP_TRANSPORT | No | The transport protocol: stdio, streamable-http, or sse. Defaults to stdio. | stdio |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| root_bisectionA | Find a root of f(x) = 0 in [a, b] using the bisection method. Requires f(a) and f(b) to have opposite signs (Bolzano's theorem). Args: func_str: Math expression in x, e.g. "x**2 - 4". a: Left endpoint of the interval. b: Right endpoint of the interval (must be > a). tol: Convergence tolerance on the residual/error. max_iter: Maximum number of iterations. precision: Rounding digits for the reported root. plot: When True, also return a PNG plot of f(x) and the root. Returns:
Dict with the root, convergence flag, iteration table and errors.
With |
| integral_simpson13A | Approximate the definite integral of f(x) on [a, b] with composite Simpson 1/3. Args: func_str: Math expression in x, e.g. "sin(x)/x". a: Lower integration limit. b: Upper integration limit (must be > a). n: Number of subintervals (must be even). Error is O(h^4). epsilon: Point in [a, b] used to report the truncation error bound. precision: Rounding digits. plot: When True, also return a PNG plot of f(x) over [a, b]. Returns:
Dict with the approximated integral, error estimates and table.
With |
| ode_rk4A | Solve an initial value problem y'(x) = f(x, y) with the Runge-Kutta 4 method. Args: ecuacion_str: Right-hand side f(x, y), e.g. "y" or "-2xy". x0: Initial x. y0: Initial y(x0). xf: Final x (must be > x0). h: Step size (must be positive). The endpoint xf is always reached. tol: Optional tolerance to flag whether the final error meets it. precision: Rounding digits. plot: When True, also return a PNG plot of the solution. Returns:
Dict with the numerical solution table, exact solution (when SymPy can
solve it) and per-step errors. With |
| interpolation_lagrangeA | Build the Lagrange interpolating polynomial through a set of points. Provide either the point values Args:
puntos_x: Distinct abscissas of the interpolation points.
x_eval: Optional x where the polynomial is evaluated.
func_str: Optional generating function f(x) for the y values.
puntos_y: Optional y values matching Returns:
Dict with the polynomial, its degree, the points table and error
bounds when |
| mc_hit_or_miss_1dA | Estimate ∫ₐᵇ f(x) dx with the hit-or-miss Monte Carlo method. Handles sign-changing integrands correctly (returns the signed integral). Args: func_str: Math expression in x. a, b: Integration limits (b > a). N: Number of samples. seed: Optional RNG seed for reproducibility. precision: Rounding digits. nivel_confianza: Confidence level in (0, 1) for the interval. plot: When True, also return a PNG plot of the samples and f(x). Returns:
Dict with the estimate, interval, sample statistics and history.
With |
| mc_valor_promedio_1dA | Estimate ∫ₐᵇ f(x) dx with the mean-value Monte Carlo method. Args: func_str: Math expression in x. a, b: Integration limits (b > a). N: Number of samples. seed: Optional RNG seed for reproducibility. precision: Rounding digits. nivel_confianza: Confidence level in (0, 1). plot: When True, also return a PNG scatter plot of the samples. Returns:
Dict with the estimate, confidence interval and sample statistics.
With |
| mc_valor_promedio_2dC | Estimate the double integral of f(x, y) over [x_a,x_b]×[y_a,y_b] by mean value. With |
| mc_valor_promedio_3dB | Estimate the triple integral of f(x,y,z) over the box [x_a,x_b]×[y_a,y_b]×[z_a,z_b]. With |
| mc_estadistico_1dA | Replicated Monte Carlo experiment (M repetitions of N samples) with statistical analysis. Args: func_str: Math expression in x. a, b: Integration limits (b > a). N: Samples per replication. M: Number of replications. nivel_confianza: Confidence level in (0, 1). seed: Optional RNG seed. precision: Rounding digits. plot: When True, also return a PNG histogram of the estimates. Returns:
Dict with the distribution of estimates and confidence intervals.
With |
| dynamic_1d_solveA | Analyze the 1D autonomous system x' = f(x): equilibria, stability, phase portrait and time series. Args: func_str: f(x) used when model is 'custom'. model: 'custom' | 'malthus' (rx) | 'verhulst' (mux*(1-x/K)) | 'newton' (-k*(x-Ta)). params: parameter values, e.g. {'r': 1.5} or {'mu': 1.0, 'K': 2.0}. x_min, x_max: state window. t_max: final time of the time series. n_phase: resolution of the phase analysis. n_time: number of time steps. initial_conditions: starting states, e.g. [0.1, 1.0]. control_enabled: add a constant control term -h (verhulst/custom only). plot: When True, also return a PNG of f(x) and the time series. Returns:
Dict with equilibria, their stability, the phase portrait data and time
solutions. With |
| dynamic_1d_equilibriaB | Find the equilibria of x' = f(x) and classify their stability. With |
| dynamic_1d_bifurcationA | Bifurcation analysis of x' = f(x; bif_param): equilibria vs parameter sweep. Args: func_str: f(x) used when model is 'custom'. model: 'custom' | 'malthus' | 'verhulst' | 'newton'. params: values of the other model parameters, e.g. {'K': 2.0}. bif_param: name of the bifurcation parameter swept between bif_min and bif_max. bif_min, bif_max, bif_steps: parameter sweep range/resolution. x_min, x_max, n_phase: state window for finding equilibria. phase_params: optional explicit parameter values for phase slices. control_enabled: add a constant control term -h (verhulst/custom only). plot: When True, also return a PNG of the bifurcation diagram. Returns:
Dict with the equilibria-vs-parameter table, exact symbolic analysis and
phase slices. With |
| dynamic_2d_linear_solveA | Solve and classify the linear 2D system X' = A·X + B with constant matrix A. Args: a, b, c, d: entries of A = [[a, b], [c, d]]. e, f: constant forcing vector B = [e, f]. x0, y0, t0, t_fin, h: initial condition and integration grid. x_min..y_max: window for the phase portrait. cantidad_trayectorias: number of sample trajectories. plot: When True, also return a PNG phase portrait. Returns:
Dict with the classification, eigenvalues, nullclines, analytic solution
and trajectories. With |
| dynamic_2d_nonlinear_solveB | Solve and analyze the nonlinear 2D system x' = f(x,y), y' = g(x,y). Args: eq_x, eq_y: Math expressions for f and g (variables x, y, mu and extra params). params: extra parameter values (e.g. {'alpha': 0.5}). mu: bifurcation parameter value. x0..y_max, cantidad_trayectorias: integration and portrait settings. plot: When True, also return a PNG phase portrait. Returns:
Dict with equilibria, Jacobian-based classification, nullclines and
trajectories. With |
| dynamic_2d_conservative_solveB | Analyze a 2D system checking conservativeness (divergence-free), Hamiltonian/energy and closed orbits. Args: eq_x, eq_y: Math expressions for x' and y'. mu: parameter value. x0..y_max, cantidad_trayectorias: integration and portrait settings. plot: When True, also return a PNG phase portrait. Returns:
Dict with the divergence check, the Hamiltonian reconstruction, the
equilibrium classification and the trajectories. With |
| dynamic_2d_lanchester_solveB | Simulate a Lanchester combat model x' = f(x,y), y' = g(x,y) with analytic time-to-annihilation. Args: eq_x, eq_y: Math expressions (classic default is x'=-αy, y'=-βx). alpha, beta, gamma, epsilon, mu, delta: Greek parameter values. x0, y0: initial force sizes. t0, t_fin, h: simulation grid. plot: When True, also return a PNG phase portrait of the battle. Returns:
Dict with the analytic winner/survivors, state equation and the
numerical trajectories. With |
| dynamic_2d_nonhomogeneous_solveA | Solve the non-homogeneous 2D system X' = A·X + B(t) with constant or time-varying forcing. Args: a, b, c, d: entries of A = [[a, b], [c, d]]. e, f: forcing components B(t); a number or an expression in t (e.g. "sin(2*t)"). x0, y0, t0, t_fin, h: integration settings. x_min..y_max, cantidad_trayectorias: portrait settings. plot: When True, also return a PNG phase portrait. Returns:
Dict with the classification, equilibrium/particular solution, analytic
solution and trajectories. With |
| root_newton_raphsonA | Find a root of f(x) = 0 with the Newton-Raphson method (numeric derivative). Args: func_str: Math expression in x. x0: Initial guess. tol: Convergence tolerance. max_iter: Maximum iterations. precision: Rounding digits. plot: When True, also return a PNG plot of f(x) and the root. Returns:
Dict with the root, iteration table and convergence flag. With
|
| root_punto_fijoA | Find a fixed point of g(x) = x with the fixed-point iteration method. Converges when |g'(x)| < 1 near the root (Lipschitz check is reported). Args: g_str: Math expression for the iteration function g(x). x0: Initial guess. tol: Convergence tolerance. max_iter: Maximum iterations. precision: Rounding digits. plot: When True, also return a PNG plot of g(x) and y = x. Returns:
Dict with the fixed point, the Lipschitz check, iteration table and
convergence flag. With |
| root_aitkenB | Accelerate fixed-point iteration with Aitken's delta-squared method. Args: g_str: Math expression for the iteration function g(x). x0: Initial guess. tol: Convergence tolerance. max_iter: Maximum iterations. precision: Rounding digits. plot: When True, also return a PNG plot of g(x) and y = x. Returns:
Dict with the accelerated root, iteration table and convergence flag.
With |
| root_compararA | Compare bisection, fixed-point, Newton-Raphson and Aitken on the same problem. Args: func_str: Math expression for f(x) (used by bisection/Newton). g_str: Math expression for g(x) (used by fixed-point/Aitken). a, b: Bracket for bisection (f(a) and f(b) must differ in sign). x0: Initial guess. tol, max_iter, precision: Shared tolerances. plot: When True, also return a PNG bar chart of the iterations used. Returns:
Dict with per-method results. With |
| integral_rectanguloA | Approximate ∫ₐᵇ f(x) dx with the composite midpoint (rectangle) rule. Args: func_str: Math expression in x. a, b: Integration limits (b > a). n: Number of subintervals. epsilon: Optional point in [a, b] for the truncation error bound. precision: Rounding digits. plot: When True, also return a PNG plot of f(x) over [a, b]. Returns:
Dict with the integral, error estimates and table. With |
| integral_trapecioA | Approximate ∫ₐᵇ f(x) dx with the composite trapezoidal rule. Args: func_str: Math expression in x. a, b: Integration limits (b > a). n: Number of subintervals. epsilon: Optional point in [a, b] for the truncation error bound. precision: Rounding digits. plot: When True, also return a PNG plot of f(x) over [a, b]. Returns:
Dict with the integral, error estimates and table. With |
| integral_simpson38A | Approximate ∫ₐᵇ f(x) dx with the composite Simpson 3/8 rule. Args: func_str: Math expression in x. a, b: Integration limits (b > a). n: Number of subintervals (must be a multiple of 3). epsilon: Optional point in [a, b] for the truncation error bound. precision: Rounding digits. plot: When True, also return a PNG plot of f(x) over [a, b]. Returns:
Dict with the integral, error estimates and table. With |
| integral_compararA | Compare rectangle, trapezoid, Simpson 1/3 and Simpson 3/8 on the same integral. Args: func_str: Math expression in x. a, b: Integration limits (b > a). n: Number of subintervals. Must be a multiple of 6 (2 for Simpson 1/3 and 3 for Simpson 3/8), so all four rules can run on the same grid. epsilon, precision: Error-bound and rounding settings. plot: When True, also return a PNG bar chart comparing the four rules. Returns:
Dict with per-method results and success flags. With |
| ode_eulerA | Solve y'(x) = f(x, y), y(x0) = y0 with the explicit Euler method (1st order). Args: ecuacion_str: Right-hand side f(x, y). x0, y0: Initial condition. xf: Final x (must be > x0). h: Step size (must be positive). tol: Optional tolerance flag for the final error. precision: Rounding digits. plot: When True, also return a PNG plot of the solution. Returns:
Dict with the numerical solution, exact solution (when available) and
errors. With |
| ode_heunA | Solve y'(x) = f(x, y), y(x0) = y0 with Heun's predictor-corrector method (2nd order). Args: ecuacion_str: Right-hand side f(x, y). x0, y0: Initial condition. xf: Final x (must be > x0). h: Step size (must be positive). tol: Optional tolerance flag for the final error. precision: Rounding digits. plot: When True, also return a PNG plot of the solution. Returns:
Dict with the numerical solution, exact solution (when available) and
errors. With |
| mc_convergencia_1dB | Show how the mean-value Monte Carlo estimate converges as samples accumulate. Args: func_str: Math expression in x. a, b: Integration limits (b > a). N: Total number of samples. seed: Optional RNG seed. precision: Rounding digits. plot: When True, also return a PNG of the running average. Returns:
Dict with the cumulative running average over the samples. With
|
| finite_differencesA | Approximate the first and second derivatives of f(x) at x with finite differences. Computes forward, backward and central differences for the first derivative, plus the central second derivative, and compares each against the exact derivative from SymPy. Args: func_str: Math expression in x. x_val: Point where the derivative is evaluated. h: Step size (small, positive). precision: Rounding digits. plot: When True, also return a PNG of f(x) and its exact tangent. Returns:
Dict with the exact and numerical derivatives and their errors. With
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 29 tools
Most tools target a distinct numerical method, but several pairs overlap heavily: dynamic_1d_solve already returns equilibria, stability, phase portrait and time series, which is nearly what dynamic_1d_equilibria does, and dynamic_2d_linear_solve (X'=A·X+B with constant B) is a special case of dynamic_2d_nonhomogeneous_solve, making selection guesswork. The Monte Carlo family (valor_promedio, estadistico, convergencia, hit_or_miss) is distinguishable but requires reading descriptions closely, and individual rule tools versus the two *_comparar tools also invite misselection.
A domain-prefix convention exists (integral_, root_, ode_, mc_, dynamic_1d_, dynamic_2d_) and is mostly snake_case, but it is broken by bare names like finite_differences and interpolation_lagrange. Spanish and English are mixed within the same pattern (integral_comparar vs integral_trapecio vs root_newton_raphson; mc_valor_promedio_1d vs mc_hit_or_miss_1d), and suffixes mix verbs (solve, comparar) with nouns, so the scheme is readable but not predictable.
At 29 tools this is well past a comfortable scope for one server. The surface could be consolidated substantially: the four quadrature rules could be a single tool with a 'method' parameter (the comparison tool already does this), as could the three ODE solvers and several of the 2D dynamical-system variants.
Core numerical analysis areas are well covered — root finding, quadrature, ODE IVPs, Monte Carlo, and dynamical systems each have multiple methods plus comparison tools. However, there are notable gaps: interpolation has only Lagrange (no Newton/divided differences or splines), and there are no direct linear-system solvers (Gauss elimination, LU, iterative methods) or least-squares/curve-fitting tools, which are standard in this domain.