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 AUG 17

Stateful SageMath MCP server with 33 symbolic math tools and a sandboxed Sage session per client.

Available components

71 Trust /100
Trust breakdown (6 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 →

Supply Chain Security100
  • No malware found by supply-chain analysis.Pass
  • No known CVEs affecting this package version or its production dependencies.Pass
  • Runs hatchling.build at install time, a recognised native-build step with no shell scripting around it. View diagnostics → Pass
  • 1 of 18 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency48
  • Source repository is publicly reachable at the declared URL. View diagnostics → Pass
  • Provenance check failed: no build-provenance attestation is published. See how to fix → View diagnostics → Fail
  • Clear OSI-approved license (MIT).Pass
  • Actively maintained (last published 0 days ago).Pass
  • Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability75
  • AI-judged instruction clarity (excellent).Pass
  • Context-footprint check failed: tool/resource definitions use about 4343 tokens (~117/item across 37 items; 37 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 Management10
  • Stability observed for 3 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 (100% of tools); any adoption earns full credit.Pass
Capabilities100
  • Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.Pass
Install

Add this component to your MCP client. Where a client-specific snippet is available, pick your client below and copy it straight into your config; otherwise use the connection detail shown.

pypi · sagemath-mcp

# add to Claude Code
claude mcp add xbp-europe-sagemath-mcp -- uvx 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"]
// 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.

  • 16 Aug 26 +1
    • Stability: 0.03 → unverified security
    • Capabilities: pass → unverified functional
    • Tool coverage: 100 → unverified functional
    • First check of Schema quality: unverified functional
    • Package version: 0.6.0 → 0.6.1 functional
  • 15 Aug 26 +15
    • Malware scan: unverified → pass security
    • Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet. security
    • Capabilities: pass → unverified functional
    • Tool coverage: 100 → unverified functional
    • Stability: unverified → 0.03 functional
    • First check of Schema quality: unverified functional
    • Package version: 0.5.0 → 0.6.0 functional
  • 14 Aug 26 55

    First indexed and scored.

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 17 Aug 2026 · Analysed pypi/sagemath-mcp@0.6.1

Provenance No attestation

The registry publishes no build provenance for this version, so there is nothing to verify.

Result No attestation
Ecosystem pypi
Install scripts 1 script
Hook Tier Command
build_backend allowlisted hatchling.build
Dependencies 18 packages
Packages resolved 18
Stale 1
Tree resolution Complete
MCP tools · 37 exposed · ~3,949 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.

Tool Tokens
boolean_algebra_operation ~120

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_variablesintegerNumber of boolean variables
operationstringyesOne of: evaluate, variables, degree, is_zero, is_one, reduce
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

calculate_expression ~53

Evaluate a SageMath expression and return numeric/string forms

NameTypeReqDescription
expressionstringyesSageMath expression to evaluate
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

cancel_sage_session ~42

Cancel any running Sage computation and restart the worker

NameTypeReqDescription
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
NameTypeReqDescription
messagestring

No examples provided.

coding_theory_operation ~135

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
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

combinatorics_operation ~204

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

NameTypeReqDescription
kSecondary argument (for binomial, combinations). Decimal strings accepted, as for n.
nyesPrimary 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…
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

differentiate_expression ~81

Differentiate an expression with respect to a variable

NameTypeReqDescription
expressionstringyesExpression to differentiate
orderintegerOrder of differentiation (1 = first, 2 = second, etc.)
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablestringVariable for differentiation

Structured output declared, but exposes no named fields.

No examples provided.

distribution_operation ~146

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

NameTypeReqDescription
distributionstringyesDistribution name: normal, exponential, poisson, chi_squared, student_t, uniform, beta, gamma
nNumber of samples (for sample operation)
operationstringyesOne of: pdf, cdf, quantile, mean, variance, sample
parametersarrayyesDistribution parameters (e.g. [0, 1] for standard normal)
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
xPoint for pdf/cdf/quantile evaluation

Structured output declared, but exposes no named fields.

No examples provided.

elliptic_curve_operation ~144

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
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

evaluate_sage ~448

Run arbitrary SageMath code in a persistent session; variables persist across calls. LAST RESORT. A dedicated tool exists for most tasks and should be preferred: it validates arguments and returns a typed result instead of a repr string. 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() Multi-step work that builds on values defined earlier in the same session.

NameTypeReqDescription
capture_stdoutbooleanCapture stdout emitted by Sage code
codestringyesSageMath code to execute
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
timeoutOverride the evaluation timeout in seconds
want_latexbooleanReturn LaTeX representation when possible
NameTypeReqDescription
elapsed_msnumberyesWall-clock execution time in milliseconds.
latexLaTeX serialization of the result when requested and supported.
resultString representation of the expression result if available.
result_typestringyes
stdoutstringCaptured stdout emitted during execution.

No examples provided.

evaluate_sage_streaming ~76

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

NameTypeReqDescription
codestringyesSageMath code to execute
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
timeout_secondsOverride timeout in seconds
NameTypeReqDescription
elapsed_msnumberyesWall-clock execution time in milliseconds.
latexLaTeX serialization of the result when requested and supported.
resultString representation of the expression result if available.
result_typestringyes
stdoutstringCaptured stdout emitted during execution.

No examples provided.

expand_expression ~45

Expand a mathematical expression

NameTypeReqDescription
expressionstringyesExpression to expand
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

factor_expression ~62

Factor a mathematical expression or integer

NameTypeReqDescription
expressionstringyesExpression to factor (e.g., 'x^2 - 1' or '60')
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

find_root ~119

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_boundnumberLeft bound of search interval
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
upper_boundnumberRight bound of search interval
variablestringVariable

Structured output declared, but exposes no named fields.

No examples provided.

geometry_operation ~106

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
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

graph_operation ~151

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)
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
sourceSource vertex
targetTarget vertex

Structured output declared, but exposes no named fields.

No examples provided.

group_operation ~122

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
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

integrate_expression ~102

Integrate an expression (indefinite or definite with bounds)

NameTypeReqDescription
expressionstringyesExpression to integrate
lower_boundLower bound for definite integral (e.g., '0', '-oo')
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
upper_boundUpper bound for definite integral (e.g., '1', 'oo')
variablestringIntegration variable

Structured output declared, but exposes no named fields.

No examples provided.

interrupt_sage_session ~44

Interrupt a running Sage computation while keeping variables defined so far

NameTypeReqDescription
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
NameTypeReqDescription
messagestring

No examples provided.

limit_expression ~106

Compute the limit of an expression

NameTypeReqDescription
directionDirection: 'plus' (right), 'minus' (left), or omit for both
expressionstringyesExpression to take the limit of
pointstringPoint to approach (e.g., '0', 'oo', '-oo')
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablestringVariable 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.

matrix_multiply ~103

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.
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

matrix_operation ~113

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
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

number_theory_operation ~167

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

NameTypeReqDescription
ayesPrimary 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…
bSecond integer, required for gcd and lcm. Same string rule.
operationstringyesOperation: 'is_prime', 'factor_integer', 'next_prime', 'gcd', 'lcm'
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

plot_expression ~88

Plot an expression and return a base64-encoded PNG image

NameTypeReqDescription
expressionstringyesExpression to plot
range_maxnumberUpper bound of plot range
range_minnumberLower bound of plot range
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablestringPlot variable

Structured output declared, but exposes no named fields.

No examples provided.

plot_multi_expression ~103

Plot multiple expressions overlaid on a single 2D graph

NameTypeReqDescription
expressionsarrayyesList of expressions to plot (e.g. ['sin(x)', 'cos(x)'])
range_maxnumberUpper bound of plot range
range_minnumberLower bound of plot range
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablestringPlot variable

Structured output declared, but exposes no named fields.

No examples provided.

plot3d_expression ~137

Plot a 3D surface of a two-variable expression as base64 PNG

NameTypeReqDescription
expressionstringyesExpression of two variables (e.g. 'sin(x)*cos(y)')
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
x_range_maxnumberX upper bound
x_range_minnumberX lower bound
x_variablestringFirst variable
y_range_maxnumberY upper bound
y_range_minnumberY lower bound
y_variablestringSecond variable

Structured output declared, but exposes no named fields.

No examples provided.

polynomial_ring_operation ~138

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

NameTypeReqDescription
base_ringstringBase 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']
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

reset_sage_session ~44

Reset the SageMath session state for the current MCP session

NameTypeReqDescription
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
NameTypeReqDescription
messagestring

No examples provided.

series_expansion ~87

Compute a Taylor/Laurent series expansion

NameTypeReqDescription
expressionstringyesExpression to expand in series
orderintegerNumber of terms in the expansion
pointstringPoint around which to expand
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablestringVariable for expansion

Structured output declared, but exposes no named fields.

No examples provided.

simplify_expression ~46

Simplify a mathematical expression

NameTypeReqDescription
expressionstringyesExpression to simplify
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

Structured output declared, but exposes no named fields.

No examples provided.

solve_equation ~80

Solve an equation or system of equations

NameTypeReqDescription
equationyesEquation string (e.g., 'x^2 - 1 = 0') or list of equations for systems
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variableVariable or list of variables to solve for

Structured output declared, but exposes no named fields.

No examples provided.

solve_ode ~115

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"
functionstringDependent function name (e.g., 'y')
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablestringIndependent 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
messagestring

No examples provided.

statistics_summary ~76

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
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.

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 ~141

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')
lowerstringLower bound (e.g. '1')
productbooleanIf true, compute a product instead of a sum
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
upperstringUpper bound (e.g. 'oo' for infinity)
variablestringIndex variable (e.g. 'n')

Structured output declared, but exposes no named fields.

No examples provided.

vector_calculus_operation ~112

Vector calculus operations: gradient, divergence, curl, laplacian

NameTypeReqDescription
expressionyesScalar field (string) for gradient/laplacian, or vector field components (list) for divergence/curl
operationstringyesOne of: gradient, divergence, curl, laplacian
sessionstringNamed workspace to use. Workspaces have independent variables; omit for 'default'.
variablesVariable names (e.g. ['x', 'y', 'z'])

Structured output declared, but exposes no named fields.

No examples provided.