Skip to content
verify mcp Beta VerifyMCP is currently in beta. If you notice any issues, get in touch and we’ll put it right.

SageMath

PYPI · SAGEMATH-MCP · SCANNED OCT 3

Stateful SageMath MCP server with 40 tools and a sandboxed Sage session per client.

Available components

+11 this week 79 Trust /100
Trust breakdown (7 categories)

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →

Supply Chain Security50
  • Malware scan not yet available for this package.Unverified
  • No known CVEs affecting this package version or its production dependencies.Pass
  • Runs hatchling.build at install time, a recognised build step with no custom scripting around it. View diagnostics → Pass
  • 1 of 18 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency100
  • Source repository is publicly reachable at the declared URL. View diagnostics → Pass
  • Cryptographically verified build provenance (signed, bound to XBP-Europe/sagemath-mcp). View diagnostics → Pass
  • Clear OSI-approved license (MIT).Pass
  • Actively maintained (last published 5 days ago).Pass
  • Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability79
  • 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).Pass
  • AI-judged instruction clarity (excellent).Pass
  • Context-footprint check failed: tool/resource definitions use about 6880 tokens (~172/item across 40 items; 40 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
  • Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management87
  • Stability observed for 26 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage100
  • 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
  • 100% of tool parameters carry a description.Pass
  • Structured output schemas are declared (93% of tools); any adoption earns full credit.Pass
Tool Safety100
  • No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
  • All 1 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation.Pass
  • An AI judge read all 41 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
  • Implements a current MCP spec version (2026-07-28).Pass
Install

How do I install the SageMath MCP server?

SageMath runs locally as a PyPI package, launched with uvx sagemath-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

pypi · sagemath-mcp

# add to Claude Code
claude mcp add xbp-europe-sagemath-mcp -- uvx sagemath-mcp
// .cursor/mcp.json
{
  "mcpServers": {
    "xbp-europe-sagemath-mcp": {
      "command": "uvx",
      "args": [
        "sagemath-mcp"
      ]
    }
  }
}
// .vscode/mcp.json
{
  "servers": {
    "xbp-europe-sagemath-mcp": {
      "command": "uvx",
      "args": [
        "sagemath-mcp"
      ]
    }
  }
}
# add to Codex CLI
codex mcp add xbp-europe-sagemath-mcp -- uvx sagemath-mcp
// opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "xbp-europe-sagemath-mcp": {
      "type": "local",
      "command": [
        "uvx",
        "sagemath-mcp"
      ],
      "enabled": true
    }
  }
}
# add to OpenClaw
openclaw mcp add xbp-europe-sagemath-mcp --command uvx --arg sagemath-mcp
# ~/.hermes/config.yaml
mcp_servers:
  xbp-europe-sagemath-mcp:
    command: "uvx"
    args: ["sagemath-mcp"]
// ~/.netclaw/config/netclaw.json
{
  "McpServers": {
    "xbp-europe-sagemath-mcp": {
      "Transport": "stdio",
      "Command": "uvx",
      "Arguments": [
        "sagemath-mcp"
      ]
    }
  }
}
# add to Vellum
assistant mcp add xbp-europe-sagemath-mcp -t stdio -c uvx -a sagemath-mcp
// mcp.json
{
  "mcpServers": {
    "xbp-europe-sagemath-mcp": {
      "command": "uvx",
      "args": [
        "sagemath-mcp"
      ]
    }
  }
}
Changelog

Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.

  • 3 Oct 26 −15
    • Malware scan: pass → unverified ▼ security
  • 2 Oct 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 80 to 83. That category is still filling its 30-day observation window: 24 days of observed history at the previous scan, 25 at this one. The score rises as the window fills, whether or not the server changes.

  • 1 Oct 26 −3
    • Stability: fail → 0.80 functional
  • 30 Sept 26 +16
    • Malware scan: unverified → pass ▲ security
  • 29 Sept 26 −15
    • Malware scan: pass → unverified ▼ security
  • 28 Sept 26 +26
    • Malware scan: unverified → pass ▲ security
    • Provenance: fail → pass ▲ security
    • The attested source repository moved: XBP-Europe/sagemath-mcp security
    • Package version: 0.9.1 → 0.9.2 functional
    • We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
  • 27 Sept 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 83 to 86.

  • 25 Sept 26 −14
    • We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
Diagnostics

Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.

Captured 3 Oct 2026 · Analysed pypi/sagemath-mcp@0.9.2

Provenance Verified

A signed build attestation was found and verified, binding this exact artifact to the source repository it claims to come from.

Result Verified
Ecosystem pypi
Reason Verified
Discovered via Registry attestation endpoint
Source repo XBP-Europe/sagemath-mcp
Certificate issuer https://token.actions.githubusercontent.com
Certificate SAN https://github.com/XBP-Europe/sagemath-mcp/.github/workflows/release.yml@refs/tags/v0.9.2
Rekor log index 2981578740
Predicate type PyPI publish attestation https://docs.pypi.org/attestations/publish/v1
Subject digest sha256:bcfb5585d885f61ab91ee9d73c9f3ba2d6e2f67d3d9300a2cfe38b70e7978d1d

Background: How many MCP packages publish verified provenance →

Install scripts 1 script
Hook Tier Command
build_backend allowlisted hatchling.build

Background: Why install scripts are a supply-chain risk →

Dependencies 18 packages
Packages resolved 18
Stale 1
Tree resolution Complete

Background: SBOMs and build attestations, explained →

MCP tools · 40 exposed · ~6,435 tokens

The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →

Tool Tokens
boolean_algebra_operation ~166

Boolean polynomials over GF(2): evaluate, list variables, degree, and zero/one tests. Prefer this over evaluate_sage for boolean algebra.

NameTypeReqDescription
expressionstringyesBoolean expression (e.g. 'x*y + x*z + y*z')
num_variablesinteger–Number of boolean variables
operationstringyesOne of: evaluate, variables, degree, is_zero, is_one, reduce
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

calculate_expression ~99

Evaluate a SageMath expression and return numeric/string forms

NameTypeReqDescription
expressionstringyesSageMath expression to evaluate
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

cancel_sage_session ~88

Cancel any running Sage computation and restart the worker

NameTypeReqDescription
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
NameTypeReqDescription
messagestring––

No examples provided.

check_sage_health ~128

Probe 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

NameTypeReqDescription
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

coding_theory_operation ~181

Error-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.

NameTypeReqDescription
code_typestringyesCode constructor, e.g. 'HammingCode(GF(2),3)', 'GeneralizedReedSolomonCode(GF(7).list()[:6],3)'
operationstringyesOne of: length, dimension, minimum_distance, generator_matrix, rate
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

combinatorics_operation ~250

Combinatorics: binomial coefficients, permutations, combinations, integer partitions, factorial, Catalan, Fibonacci and Bell numbers. Prefer this over evaluate_sage for any of these.

NameTypeReqDescription
k––Secondary argument (for binomial, combinations). Decimal strings accepted, as for n.
n–yesPrimary integer argument. Values at or above 2^53 must be passed as a decimal string, e.g. "9007199254740993", because a JSON number that large has already been rounded by the client.
operationstringyesOne of: binomial (n choose k), permutations (n!), combinations (n choose k), partitions (COUNT of integer partitions of n), factorial (n!), catalan (nth Catalan number), fibonacci (nth Fibonacci numb…
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

differentiate_expression ~127

Differentiate an expression with respect to a variable

NameTypeReqDescription
expressionstringyesExpression to differentiate
orderinteger–Order of differentiation (1 = first, 2 = second, etc.)
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variablestring–Variable for differentiation

Structured output declared, but exposes no named fields.

No examples provided.

distribution_operation ~192

Probability distribution operations: PDF, CDF, quantile, mean, variance, sampling

NameTypeReqDescription
distributionstringyesDistribution name: normal, exponential, poisson, chi_squared, student_t, uniform, beta, gamma
n––Number of samples (for sample operation)
operationstringyesOne of: pdf, cdf, quantile, mean, variance, sample
parametersarrayyesDistribution parameters (e.g. [0, 1] for standard normal)
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
x––Point for pdf/cdf/quantile evaluation

Structured output declared, but exposes no named fields.

No examples provided.

elliptic_curve_operation ~190

Elliptic curves over Q: rank, torsion order, discriminant, j-invariant, conductor and generators, from Weierstrass coefficients. Prefer this over evaluate_sage for curve invariants.

NameTypeReqDescription
coefficientsarrayyesCurve coefficients [a1,a2,a3,a4,a6] or short Weierstrass [a,b] for y^2 = x^3 + a*x + b
operationstringyesOne of: rank, torsion_order, discriminant, j_invariant, conductor, gens
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

evaluate_sage ~608

Run 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 builds an object once and then explores it (a graph and its invariants, a number field, a matrix decomposition) belongs in evaluate_sage across as many calls as it takes. For a one-off, reach for one of these first: - calculus: differentiate_expression, integrate_expression, limit_expression, series_expansion, symbolic_sum, solve_ode - algebra: solve_equation, simplify_expression, expand_expression, factor_expression, find_root - linear algebra: matrix_operation (determinant, inverse, eigenvalues, rank, rref, transpose), matrix_multiply - discrete: number_theory_operation, combinatorics_operation (binomial, partitions, catalan, fibonacci, bell), graph_operation, group_operation - specialised: elliptic_curve_operation, coding_theory_operation, polynomial_ring_operation, boolean_algebra_operation, geometry_operation, vector_calculus_operation - data: statistics_summary, distribution_operation - plots: plot_expression, plot3d_expression, plot_multi_expression Use evaluate_sage only for what those do not cover, for example: Transforms: var('t s'); laplace(sin(t), t, s); inverse_laplace(1/(s^2+1), s, t) Modular arithmetic: Mod(17, 5); power_mod(3, 100, 97) Recurrences: var('n'); f = function('f'); desolve_rec(f(n+2)-f(n+1)-f(n), f, [0, 1]) Continued fractions: continued_fraction(pi).convergents()[:10] Number fields: K.<a> = NumberField(x^3 - 2); K.class_number() Any multi-step work t…

NameTypeReqDescription
capture_stdoutboolean–Capture stdout emitted by Sage code
codestringyesSageMath code to execute
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
timeout––Override the evaluation timeout in seconds
want_latexboolean–Return LaTeX representation when possible
NameTypeReqDescription
elapsed_msnumberyesWall-clock execution time in milliseconds.
latex––LaTeX serialization of the result when requested and supported.
result––String representation of the expression result if available.
result_typestringyes–
stdoutstring–Captured stdout emitted during execution.

No examples provided.

evaluate_sage_streaming ~122

Execute SageMath code and stream intermediate print() output line by line. Final result is returned as usual.

NameTypeReqDescription
codestringyesSageMath code to execute
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
timeout_seconds––Override timeout in seconds
NameTypeReqDescription
elapsed_msnumberyesWall-clock execution time in milliseconds.
latex––LaTeX serialization of the result when requested and supported.
result––String representation of the expression result if available.
result_typestringyes–
stdoutstring–Captured stdout emitted during execution.

No examples provided.

expand_expression ~91

Expand a mathematical expression

NameTypeReqDescription
expressionstringyesExpression to expand
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

factor_expression ~108

Factor a mathematical expression or integer

NameTypeReqDescription
expressionstringyesExpression to factor (e.g., 'x^2 - 1' or '60')
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

find_root ~165

Find a numeric root of an expression or equation in a given interval

NameTypeReqDescription
expressionstringyesExpression or equation to find a root of (e.g. 'x - cos(x)', or 'E - 0.6*sin(E) = 0.75')
lower_boundnumber–Left bound of search interval
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
upper_boundnumber–Right bound of search interval
variablestring–Variable

Structured output declared, but exposes no named fields.

No examples provided.

geometry_operation ~152

Computational geometry on point sets: euclidean distance, polygon area, polytope volume, convex hull vertices and convexity tests. Prefer this over evaluate_sage for these.

NameTypeReqDescription
operationstringyesOne of: distance, polygon_area, polytope_volume, convex_hull_vertices, is_convex
pointsarrayyesList of points as coordinate lists
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

graph_operation ~197

Graph theory: create named graphs and compute properties (chromatic_number, is_connected, diameter, etc.)

NameTypeReqDescription
graphstringyesGraph constructor: a named graph like 'PetersenGraph' or an adjacency dict like '{0:[1,2], 1:[0,2], 2:[0,1]}'
operationstringyesOne of: chromatic_number, is_connected, is_planar, diameter, order, size, degree_sequence, adjacency_matrix, shortest_path (requires source and target)
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
source––Source vertex
target––Target vertex

Structured output declared, but exposes no named fields.

No examples provided.

group_operation ~168

Group theory: construct groups and query properties (order, is_abelian, center, etc.)

NameTypeReqDescription
groupstringyesSage group constructor, e.g. 'SymmetricGroup(5)', 'DihedralGroup(4)', 'CyclicPermutationGroup(6)', 'AlternatingGroup(5)'
operationstringyesOne of: order, is_abelian, is_cyclic, center_order, conjugacy_classes_count, exponent
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

integrate_expression ~148

Integrate an expression (indefinite or definite with bounds)

NameTypeReqDescription
expressionstringyesExpression to integrate
lower_bound––Lower bound for definite integral (e.g., '0', '-oo')
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
upper_bound––Upper bound for definite integral (e.g., '1', 'oo')
variablestring–Integration variable

Structured output declared, but exposes no named fields.

No examples provided.

interrupt_sage_session ~90

Interrupt a running Sage computation while keeping variables defined so far

NameTypeReqDescription
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
NameTypeReqDescription
messagestring––

No examples provided.

limit_expression ~152

Compute the limit of an expression

NameTypeReqDescription
direction––Direction: 'plus' (right), 'minus' (left), or omit for both
expressionstringyesExpression to take the limit of
pointstring–Point to approach (e.g., '0', 'oo', '-oo')
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variablestring–Variable approaching the point

Structured output declared, but exposes no named fields.

No examples provided.

list_sage_sessions ~21

List the named Sage workspaces belonging to this client

Input schema present but exposes no named parameters.

Structured output declared, but exposes no named fields.

No examples provided.

lookup_sage_doc ~57

Documentation links for a SageMath name, plus whether this server offers that name to evaluate_sage caller code

NameTypeReqDescription
symbolstringyesA SageMath name, e.g. 'EllipticCurve' or 'desolve'

Structured output declared, but exposes no named fields.

No examples provided.

matrix_multiply ~149

Multiply two matrices and return the result as nested lists

NameTypeReqDescription
matrix_aarrayyesLeft matrix (rows of numbers). Integers stay exact; pass values from 2^53 up as decimal strings, e.g. "9007199254740993".
matrix_barrayyesRight matrix (rows of numbers). Integers stay exact.
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

matrix_operation ~159

Linear algebra on one matrix: determinant, inverse, eigenvalues, rank, reduced row echelon form, transpose. Prefer this over evaluate_sage.

NameTypeReqDescription
matrixarrayyesMatrix as nested list of numbers. Integers stay exact; pass values from 2^53 up as decimal strings.
operationstringyesOne of: determinant, inverse, eigenvalues, rank, rref, transpose
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

number_theory_operation ~213

Number theory: primality testing, integer factorisation, the next prime above n, gcd and lcm. Prefer this over evaluate_sage for any of these.

NameTypeReqDescription
a–yesPrimary integer. Pass values above 2^53 as a decimal STRING: JSON numbers are IEEE doubles in JavaScript-based clients, so 10^30 arrives as 1000000000000000019884624838656 and the answer is silently…
b––Second integer, required for gcd and lcm. Same string rule.
operationstringyesOperation: 'is_prime', 'factor_integer', 'next_prime', 'gcd', 'lcm'
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

plot_expression ~164

Plot an expression and return it as a rendered image (PNG or SVG)

NameTypeReqDescription
expressionstringyesExpression to plot
image_formatstring–Image format to return: 'png' (raster) or 'svg' (vector, smaller)
range_maxnumber–Upper bound of plot range
range_minnumber–Lower bound of plot range
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variablestring–Plot variable

No output schema declared.

No examples provided.

plot_multi_expression ~182

Plot multiple expressions overlaid on a single 2D graph, as a rendered image

NameTypeReqDescription
expressionsarrayyesList of expressions to plot (e.g. ['sin(x)', 'cos(x)'])
image_formatstring–Image format to return: 'png' (raster) or 'svg' (vector, smaller)
range_maxnumber–Upper bound of plot range
range_minnumber–Lower bound of plot range
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variablestring–Plot variable

No output schema declared.

No examples provided.

plot3d_expression ~211

Plot a 3D surface of a two-variable expression as a rendered image

NameTypeReqDescription
expressionstringyesExpression of two variables (e.g. 'sin(x)*cos(y)')
image_formatstring–Image format to return: 'png' (raster) or 'svg' (vector, smaller)
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
x_range_maxnumber–X upper bound
x_range_minnumber–X lower bound
x_variablestring–First variable
y_range_maxnumber–Y upper bound
y_range_minnumber–Y lower bound
y_variablestring–Second variable

No output schema declared.

No examples provided.

polynomial_ring_operation ~184

Polynomial ring operations: construct rings and compute Groebner bases, ideals, quotients

NameTypeReqDescription
base_ringstring–Base ring
operationstringyesOne of: groebner_basis, ideal_dimension, ideal_variety, reduce, is_groebner
polynomialsarrayyesPolynomials as strings, e.g. ['a^2+b', 'b^2-1']
ring_varsarrayyesVariable names, e.g. ['a', 'b', 'c']
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

reset_sage_session ~90

Reset the SageMath session state for the current MCP session

NameTypeReqDescription
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
NameTypeReqDescription
messagestring––

No examples provided.

series_expansion ~133

Compute a Taylor/Laurent series expansion

NameTypeReqDescription
expressionstringyesExpression to expand in series
orderinteger–Number of terms in the expansion
pointstring–Point around which to expand
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variablestring–Variable for expansion

Structured output declared, but exposes no named fields.

No examples provided.

simplify_expression ~92

Simplify a mathematical expression

NameTypeReqDescription
expressionstringyesExpression to simplify
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

solve_equation ~126

Solve an equation or system of equations

NameTypeReqDescription
equation–yesEquation string (e.g., 'x^2 - 1 = 0') or list of equations for systems
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variable––Variable or list of variables to solve for

Structured output declared, but exposes no named fields.

No examples provided.

solve_ode ~161

Solve an ordinary differential equation of any order, returning the general solution with arbitrary constants. Prefer this over evaluate_sage.

NameTypeReqDescription
equationstringyesODE string, e.g., "diff(y(x),x) + y(x) = 0"
functionstring–Dependent function name (e.g., 'y')
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variablestring–Independent variable (e.g., 'x')

Structured output declared, but exposes no named fields.

No examples provided.

start_sage_session ~41

Start a named Sage workspace with its own independent variables

NameTypeReqDescription
namestringyesWorkspace name, e.g. 'curves' or 'scratch'
NameTypeReqDescription
messagestringyesHuman-readable confirmation.
namestringyesThe workspace name this handle was opened for.
workspace_tokenstringyesOpaque handle for this workspace. Pass it as the 'session' argument of later tool calls to reach the same state regardless of the transport session. Treat it as a secret.

No examples provided.

statistics_summary ~122

Descriptive 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.

NameTypeReqDescription
dataarrayyesList of numeric values
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…

Structured output declared, but exposes no named fields.

No examples provided.

stop_sage_session ~31

Stop a named Sage workspace and release its worker

NameTypeReqDescription
namestringyesWorkspace name to stop
NameTypeReqDescription
messagestring––

No examples provided.

symbolic_sum ~187

Closed form of a symbolic sum or product over an index variable, including infinite series. Prefer this over evaluate_sage for summations.

NameTypeReqDescription
expressionstringyesExpression to sum (e.g. '1/n^2')
lowerstring–Lower bound (e.g. '1')
productboolean–If true, compute a product instead of a sum
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
upperstring–Upper bound (e.g. 'oo' for infinity)
variablestring–Index variable (e.g. 'n')

Structured output declared, but exposes no named fields.

No examples provided.

vector_calculus_operation ~158

Vector calculus operations: gradient, divergence, curl, laplacian

NameTypeReqDescription
expression–yesScalar field (string) for gradient/laplacian, or vector field components (list) for divergence/curl
operationstringyesOne of: gradient, divergence, curl, laplacian
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
variables––Variable names (e.g. ['x', 'y', 'z'])

Structured output declared, but exposes no named fields.

No examples provided.

verify_claim ~532

Independently 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 interval arithmetic and numeric sampling over the free variables. Verdicts are honest by construction: 'proved' and 'refuted' are exact decisions ('refuted' always exhibits its counterexample or certified enclosure); 'supported' means the numeric evidence is consistent with the claim without proving it, and says how many samples at what precision; 'undecided' means every rung was inconclusive -- it never means false. Exactness is never assumed. Decimal literals are read exactly (0.1 means 1/10, never the 53-bit double), and a comparison whose operands are machine floats (RR/RDF/CC, an .n() result) is reported as 'supported' over inexact numbers, never as an exact proof -- state it over ZZ/QQ/QQbar or symbolically for an exact verdict. The session's active assumptions (assume(x > 0), assume(x, 'integer')) are honored: a sampled counterexample must lie inside the stated domain, and any verdict that relied on an assumption names it in the evidence.

NameTypeReqDescription
claimstringyesThe claim to check, as a single comparison, e.g. 'sin(x)**2 + cos(x)**2 == 1'
precision_bitsinteger–Precision of the certified interval arithmetic behind numeric verdicts
samplesinteger–Sample points per free variable sweep when the claim cannot be decided exactly
sessionstring–Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the sa…
timeout––Override the evaluation timeout in seconds
NameTypeReqDescription
assumptionsarray–The session's active assumptions in force during the check (e.g. "x is integer"). A verdict is only valid under these; they are also named in the evidence so no branch can conceal them.
claimstringyesThe claim that was checked, whitespace-folded.
evidence––What the deciding rung actually established, including the counterexample for a sampled refutation.
method––The rung that decided: exact_comparison, symbolic_prover, exact_difference, exact_algebraic, certified_interval, numeric_sampling, float_comparison (operands were machine floats, so the result is onl…
precision_bits––Interval-arithmetic precision behind a numeric verdict.
samples––Number of sample points supporting a numeric-sampling verdict.
verdictstringyesproved/refuted are exact; supported is evidence short of proof; undecided means every rung of the ladder was inconclusive.

No examples provided.

Common questions

What is the SageMath MCP server?

SageMath is an MCP server listed in the public MCP registry as io.github.XBP-Europe/sagemath-mcp. Stateful SageMath MCP server with 40 tools and a sandboxed Sage session per client. This page covers its PyPI package (sagemath-mcp).

Is the SageMath MCP server safe to use?

SageMath scores 79 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 3 October 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

What tools does the SageMath MCP server expose?

SageMath exposes 40 tools: solve_equation, matrix_multiply, matrix_operation, boolean_algebra_operation, polynomial_ring_operation, and 35 more. Their descriptions and schemas cost roughly 6,435 tokens of context every time the server is loaded.

Is the SageMath MCP server still maintained?

SageMath is still listed as active in the MCP registry. We last reached this channel on 3 October 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

What licence is the SageMath MCP server under?

SageMath declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.