# SageMath MCP server

> Run symbolic math, number theory, graphs and plotting in a sandboxed, persistent SageMath session, and verify claims.

- Listing: https://mcp.tc/i/sagemath
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: no API key needed
- Category: [Utilities](https://mcp.tc/c/utilities)
- Vendor: XBP-Europe
- Repository: <https://github.com/XBP-Europe/sagemath-mcp>
- Package: pypi `sagemath-mcp`

## About

Gives an LLM a sandboxed mathematical subset of SageMath: symbolic calculus, number theory, linear algebra, ODEs, plotting, combinatorics, graphs, groups and elliptic curves. It ships 40 tools, including verify\_claim, which re-checks a stated result and answers proved, refuted, supported or undecided with evidence. Each MCP session gets its own Sage worker, so variables and assumptions persist across calls.

Runs locally over stdio from the PyPI package (needs a SageMath runtime on the host, or the passagemath extra) or as a hardened Docker image. Caller code is deny-by-default through an AST policy. No sign-in or API key is needed; the server has no authentication, so keep it on loopback.

## What it can do

- Evaluate symbolic math in a persistent Sage session
- Work with number theory, linear algebra and ODEs
- Compute combinatorics, graphs, groups and elliptic curves
- Plot mathematical functions
- Verify claims with a proof ladder returning proved, refuted, supported or undecided
- Deny-by-default code policy inside a hardened container

## Example prompts

- "Factor x^6 - 1 over the integers with Sage"
- "Solve this ODE and plot the solution: y'' + y = 0"
- "Verify the claim that n^2 + n is even for all integers n"
- "Compute the rank of this elliptic curve: y^2 = x^3 - 2x + 1"

## Install

### Any client

We don’t have a verified install command for this server yet. Its own instructions are the place to start.

Package: `sagemath-mcp` on PYPI.

[Open the setup instructions](<https://github.com/XBP-Europe/sagemath-mcp>) (opens github.com)

## Recent changes

- 2026-11-09 20:29 UTC: New version 0.10.0 (was 0.9.7), read from PyPI. Source: automatic check.
- 2026-10-26 20:29 UTC: New version 0.9.7 (was 0.9.6), read from PyPI. Source: automatic check.
- 2026-10-24 16:22 UTC: New version 0.9.6 (was 0.9.5), read from PyPI. Source: automatic check.
- 2026-10-18 04:21 UTC: Tracking started: version 0.9.5. Source: automatic check.

More on the History tab, with descriptions before and after for the newest entries: https://mcp.tc/i/sagemath#history (Atom feed: https://mcp.tc/i/sagemath/history.xml). It records what mcp.tc's anonymous checks saw, every 3 hours where the tool list can be read without sign-in; it is not a security review.

## Details

- Server version: 0.10.1
- Last checked: 2026-10-18
- Listed: 2026-10-18
- Updated: 2026-10-26

---
Source: https://mcp.tc/i/sagemath (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
