Stateful SageMath MCP server with 33 symbolic math tools and a sandboxed Sage session per client.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A mathematics Model Context Protocol (MCP) server that gives LLM clients a sandboxed mathematical subset of SageMath --- one of the most comprehensive open-source mathematics systems available. Built on FastMCP 3.x, the server maintains a dedicated SageMath process for each MCP session so variables, functions, and assumptions persist across tool calls. Caller code is deny-by-default: the full breadth of Sage mathematics is reachable, but imports, the external CAS interfaces, and the file/display/persistence primitives are not (see Security Sandbox).
Whether the task is symbolic calculus, number theory, linear algebra, differential equations, plotting, combinatorics, graph theory, group theory, or basic arithmetic, the server provides 40 MCP tools --- the math tools backed by the SageMath engine, plus evaluate_sage_streaming (streaming wrapper) and HTTP /health and /ready endpoints.
| Category | Tools | Backend | Capabilities |
|---|---|---|---|
| Core execution | evaluate_sage, evaluate_sage_streaming | Sage | Run SageMath code (the mathematical subset the sandbox permits) with persistent state, LaTeX output, stdout capture, progress heartbeats, per-call timeouts, and line-by-line streaming |
| Calculus | differentiate_expression, integrate_expression, limit_expression, series_expansion | Sage | Derivatives of any order, indefinite & definite integrals, one-sided limits, Taylor/Laurent series |
| Algebra | solve_equation, simplify_expression, expand_expression, factor_expression, calculate_expression | Sage | Single equations & systems, symbolic simplification, expansion, factoring, numeric evaluation |
| Symbolic sums | symbolic_sum | Sage | Symbolic summation and products (finite and infinite series) |
| Linear algebra | matrix_multiply, matrix_operation | Sage | Matrix products, determinants, inverses, eigenvalues, rank, RREF, transpose |
| Differential equations | solve_ode | Sage | First- and higher-order ODEs via Sage's desolve() |
| Number theory | number_theory_operation | Sage | Primality testing, integer factorization, next prime, GCD, LCM |
| Combinatorics | combinatorics_operation | Sage | Binomial, permutations, combinations, partitions, factorial, Catalan, Fibonacci, Bell numbers |
| Graph theory | graph_operation | Sage | Named graphs including parameterised constructors (CompleteGraph(4)) and adjacency dicts; chromatic number, connectivity, planarity, diameter, shortest path |
| Group theory | group_operation | Sage | Symmetric, dihedral, cyclic, alternating groups; order, abelian/cyclic test, center, exponent |
| Elliptic curves | elliptic_curve_operation | Sage | Rank, torsion, discriminant, j-invariant, conductor, generators |
| Coding theory | coding_theory_operation | Sage | Hamming and generalized Reed-Solomon codes; length, dimension, minimum distance, generator matrix, rate |
| Polynomial rings | polynomial_ring_operation | Sage | Groebner bases, ideal dimension/variety, reduction, Groebner test |
| Boolean algebra | boolean_algebra_operation | Sage | Boolean polynomial ring, addressed as x, y, z or x0, x1, x2; evaluate, variables, degree, zero/one test |
| Geometry | geometry_operation | Sage | Distance, polygon area, polytope volume, convex hull, compactness via Polyhedron |
| Statistics | statistics_summary | Sage | Mean, median, population & sample variance/std dev, min, max |
| Probability | distribution_operation | Sage | Normal, exponential, Poisson, chi-squared, Student-t, uniform, beta, gamma; PDF, CDF, quantile, analytic mean/variance, sampling |
| Visualization | plot_expression, plot3d_expression, plot_multi_expression | Sage | 2D plots, 3D surface plots, multi-function overlays, returned as rendered images (PNG or SVG) the client displays |
| Numeric methods | find_root | Sage | Numeric root-finding in an interval via Sage's find_root(), from an expression or an equation |
| Verification | verify_claim | Sage | Independently re-check a stated claim through a proof ladder; answers proved, refuted, supported or undecided, always with its evidence |
| Vector calculus | vector_calculus_operation | Sage | Gradient, divergence, curl, Laplacian on scalar/vector fields |
| Session control | reset_sage_session, interrupt_sage_session, cancel_sage_session | Worker | Clear state, or stop a computation with or without keeping variables |
| Named workspaces | start_sage_session, list_sage_sessions, stop_sage_session | Worker | Several independent variable namespaces per client |
| Diagnostics | check_sage_health, lookup_sage_doc | Worker/Server | MCP-level readiness probe (evaluates 1+1, reports latency); doc links for a Sage name plus whether this server offers it to caller code |
| Infrastructure | /health and /ready endpoints, 3 MCP resources | Server | Liveness (process up) and readiness (evaluates 1+1 on the backend), session snapshots, aggregated metrics, documentation links |
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/sagemath)<a href="https://allmcps.com/mcp/sagemath"><img src="https://allmcps.com/api/badge/sagemath?style=directory" alt="SageMath on AllMCPs" /></a>