Sagemath MCP
UnclaimedStateful SageMath MCP server: 37 tools for symbolic math, algebra, number theory, graphs and plotting. A persistent Sage session per client, an AST policy in front of it, and a hardened container as the real boundary.
Install
docker run -p 8314:8314 sagemath-mcp:latest --transport streamable-httpSet up this server
More in AI & ML
Browse the full directoryUnclaimed listing
Is this your MCP server?
This listing was auto-indexed from the public record. Claim it to edit the page, set compatibility and unlock growth tools. Takes under two minutes.
Claim this serverSecurity profile
Claimed and verified servers get a weekly static scan that shows what the code can reach: external services, environment variables, shell commands, agent configuration folders, plus any dependencies with known advisories. Claim this listing to get one. How the security profile works
23 of 23 tools
Documented tools (23)
From project documentation. A server handshake does not verify each tool’s description or behavior.
calculate_expression
Evaluate a symbolic expression and return both its string representation and numeric value (when possible). Uses Sage's sageeval() internally with pre-declared variables x, y, z, t.
cancel_sage_session
Abort any in-flight computation by killing the worker process and starting a new one. All session state is lost — reach for this only when the worker is wedged badly enough that interrupting does not help.
check_sage_health
The MCP-level readiness probe, for stdio clients that cannot reach the HTTP
differentiate_expression
Compute the symbolic derivative of an expression. Calls Sage's diff(expr, var, order) internally.
evaluate_sage
-- Open-Ended SageMath Execution
expand_expression
Expand products, powers, and trigonometric/logarithmic identities using Sage's expand().
factor_expression
Factor a symbolic expression or integer using Sage's factor().
integrate_expression
Compute indefinite or definite integrals. Calls Sage's integrate() function.
interrupt_sage_session
Stop a running computation while keeping every variable defined so far. The worker is signalled, abandons the current statement, and stays alive with its namespace intact. The interrupted call returns an Interrupted error.
limit_expression
Compute the limit of an expression as a variable approaches a point. Calls Sage's limit() function.
lookup_sage_doc
Documentation links for one SageMath name, plus the half the upstream manual
matrix_multiply
Multiply two matrices over the Symbolic Ring (SR). Input matrices are nested lists of numbers.
matrix_operation
Perform a single matrix operation. Supports six operations on matrices over the Symbolic Ring.
number_theory_operation
Perform common number-theoretic operations using Sage's built-in functions.
plot_expression
Render a 2D plot of an expression and return it as MCP image content (PNG by default, or SVG via imageformat) the client displays inline. Calls Sage's plot(), renders to an in-memory buffer at a bounded size, and returns it as an image block rather than a base64 string.
reset_sage_session
Clear all variables, functions, and definitions in the current session. The underlying worker process continues running (fast). Equivalent to restarting a fresh Sage shell.
series_expansion
Compute a Taylor or Laurent series expansion around a point. Calls Sage's .series() method.
simplify_expression
Apply Sage's simplify() function to reduce a symbolic expression to a simpler form.
solve_equation
Solve a single equation or a system of simultaneous equations. Calls Sage's solve() function. Equations are parsed by splitting on =: the string "x^2 - 1 = 0" becomes the Sage equation x^2 - 1 == 0.
solve_ode
Solve an ordinary differential equation using Sage's desolve(). The equation is specified as a string using Sage's diff() notation. The solver returns a general solution with arbitrary constants (C, K1, K2, etc.).
statistics_summary
Compute descriptive statistics for a numeric dataset using Sage's mean() and sqrt() functions.
verify_claim
The checking primitive for the dominant failure mode of models doing
workspace_token
a server-issued, unguessable handle that addresses that one
Tool change history
FAQ
Questions about Sagemath MCP Server
- How do I connect Sagemath MCP Server to Claude?
- The listing records `docker run -p 8314:8314 sagemath-mcp:latest --transport streamable-http` as its setup step. Run it, then follow the repository's instructions for the client configuration; the listing names Claude Desktop, Claude Code as compatible clients.
- Is Sagemath MCP Server free?
- The listed licence is MIT. Check the upstream terms for permitted use and commercial requirements; a public repository does not by itself mean the software is free or open source. Connected APIs and hosted services may have separate charges.
- What can Sagemath MCP Server do?
- Sagemath MCP Server documents 23 tools to the agent, including calculate_expression, cancel_sage_session, check_sage_health. The descriptions above come from project documentation. A live handshake does not test individual tool behavior.