SageMath
Stateful SageMath MCP server with 40 tools and a sandboxed Sage session per client.
Connector by XBP-Europe · GitHub account verified by the MCP Registry
Chalk Labs
Need help deploying SageMath?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/xbp-europe-sagemath-mcp
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data-analysis
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.
- Tools
- 2 read · 35 write · 3 delete
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Tools by what they do 40
Read from the source code; the running server may list different tools.
Read 2 · Look things up without changing anything.
list_sage_sessionslookup_sage_doc
Write 35 · Create, change, send or run things.
boolean_algebra_operationcalculate_expressioncheck_sage_healthcoding_theory_operationcombinatorics_operationdifferentiate_expressiondistribution_operationelliptic_curve_operationevaluate_sageevaluate_sage_streamingexpand_expressionfactor_expression
Show 23 more tools
find_rootgeometry_operationgraph_operationgroup_operationintegrate_expressioninterrupt_sage_sessionlimit_expressionmatrix_multiplymatrix_operationnumber_theory_operationplot_expressionplot_multi_expressionplot3d_expressionpolynomial_ring_operationseries_expansionsimplify_expressionsolve_equationsolve_odestart_sage_sessionstatistics_summarysymbolic_sumvector_calculus_operationverify_claim
Delete 3 · Delete, drop, revoke or wipe things.
cancel_sage_sessionreset_sage_sessionstop_sage_session
Network hosts it talks to 6
doc.sagemath.org· found in codedoi.org· found in codeget.helm.sh· found in codegithub.com· found in codeglama.ai· found in codezenodo.org· found in code
Files it touches
- Any path the agent passes to its tools
Tools (40)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
boolean_algebra_operationBoolean polynomials over GF(2): evaluate, list variables, degree, and zero/one tests. Prefer this over evaluate_sage for boolean algebra.
calculate_expressionEvaluate a SageMath expression and return numeric/string forms
cancel_sage_sessioncan change or delete dataCancel any running Sage computation and restart the worker
check_sage_healthProbe whether SageMath evaluation works right now: starts (or reuses) the workspace's worker, evaluates 1+1, and reports readiness and latency. Reports failure in the result instead of erroring, so it is always safe to call
coding_theory_operationError-correcting codes: length, dimension, minimum distance, rate and generator matrix for Hamming and generalized Reed-Solomon codes. Prefer this over evaluate_sage for code parameters.
combinatorics_operationCombinatorics: binomial coefficients, permutations, combinations, integer partitions, factorial, Catalan, Fibonacci and Bell numbers. Prefer this over evaluate_sage for any of these.
differentiate_expressionDifferentiate an expression with respect to a variable
distribution_operationProbability distribution operations: PDF, CDF, quantile, mean, variance, sampling
elliptic_curve_operationElliptic curves over Q: rank, torsion order, discriminant, j-invariant, conductor and generators, from Weierstrass coefficients. Prefer this over evaluate_sage for curve invariants.
evaluate_sageRun SageMath code in a persistent session; variables persist across calls. Caller code is deny-by-default -- ordinary mathematics is allowed, but imports, external CAS interfaces and file/display/persistence calls are refused. LAST RESORT for a single self-contained calculation: a dedicated tool exists for most of those and should be preferred, because it validates arguments and returns a typed result instead of a repr string. One exception overrides that steer -- the dedicated tools evaluate in a FRESH namespace and cannot see variables you defined here, so any multi-step workflow that build…
evaluate_sage_streamingExecute SageMath code and stream intermediate print() output line by line. Final result is returned as usual.
expand_expressionExpand a mathematical expression
factor_expressionFactor a mathematical expression or integer
find_rootFind a numeric root of an expression or equation in a given interval
geometry_operationComputational geometry on point sets: euclidean distance, polygon area, polytope volume, convex hull vertices and convexity tests. Prefer this over evaluate_sage for these.
Show 25 more tools
graph_operationGraph theory: create named graphs and compute properties (chromatic_number, is_connected, diameter, etc.)
group_operationGroup theory: construct groups and query properties (order, is_abelian, center, etc.)
integrate_expressionIntegrate an expression (indefinite or definite with bounds)
interrupt_sage_sessionInterrupt a running Sage computation while keeping variables defined so far
limit_expressionCompute the limit of an expression
list_sage_sessionsread-onlyList the named Sage workspaces belonging to this client
lookup_sage_docread-onlyDocumentation links for a SageMath name, plus whether this server offers that name to evaluate_sage caller code
matrix_multiplyMultiply two matrices and return the result as nested lists
matrix_operationLinear algebra on one matrix: determinant, inverse, eigenvalues, rank, reduced row echelon form, transpose. Prefer this over evaluate_sage.
number_theory_operationNumber theory: primality testing, integer factorisation, the next prime above n, gcd and lcm. Prefer this over evaluate_sage for any of these.
plot_expressionPlot an expression and return it as a rendered image (PNG or SVG)
plot_multi_expressionPlot multiple expressions overlaid on a single 2D graph, as a rendered image
plot3d_expressionPlot a 3D surface of a two-variable expression as a rendered image
polynomial_ring_operationPolynomial ring operations: construct rings and compute Groebner bases, ideals, quotients
reset_sage_sessioncan change or delete dataReset the SageMath session state for the current MCP session
series_expansionCompute a Taylor/Laurent series expansion
simplify_expressionSimplify a mathematical expression
solve_equationSolve an equation or system of equations
solve_odeSolve an ordinary differential equation of any order, returning the general solution with arbitrary constants. Prefer this over evaluate_sage.
start_sage_sessionStart a named Sage workspace with its own independent variables
statistics_summaryDescriptive statistics for a list of numbers: mean, median, population and sample variance and standard deviation, min and max. Prefer this over evaluate_sage for summary statistics.
stop_sage_sessioncan change or delete dataStop a named Sage workspace and release its worker
symbolic_sumClosed form of a symbolic sum or product over an index variable, including infinite series. Prefer this over evaluate_sage for summations.
vector_calculus_operationVector calculus operations: gradient, divergence, curl, laplacian
verify_claimIndependently re-check a stated mathematical claim and report how far the evidence goes: proved, refuted, supported or undecided. Use this to verify your own algebra before presenting it. The claim is a single comparison in Sage syntax -- an equality, an inequality, or anything that evaluates to True/False: integral(x^2/(e^x-1), x, 0, oo) == 2*zeta(3) sin(x)^2 + cos(x)^2 == 1 pi < 22/7 e^pi != pi^e The check climbs a ladder: Sage's symbolic prover, the exact difference ((lhs-rhs).simplify_full().is_zero()), exact arithmetic over QQbar/AA when the claim is constant, then certified in…
Signals
- Stars
- 18
- Forks
- 1
- Open issues
- 1
- Weekly downloads
- 141
- Last commit
- Oct 19, 2026 (12 days ago)
- Last release
- Oct 13, 2026 (18 days ago)
- Last package publish
- Oct 13, 2026 (18 days ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.XBP-Europe/sagemath-mcp- Version
- 0.9.5
- Auth
- No auth
- Packages
- pypi sagemath-mcpoci
ghcr.io/xbp-europe/sagemath-mcp:0.9.5 - License
- MIT
- Repository
- github.com/XBP-Europe/sagemath-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get SageMath running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
SageMath MCP server. Agent Mart. https://agentmart.dev/connectors/xbp-europe-sagemath-mcp (last updated 2026-10-24)