Skip to content
SageMath MCP Server

SageMath MCP Server

Released
v0.12.0
MIT

Summary

A sandboxed SageMath session per MCP client: 40 tools for symbolic calculus, number theory, linear algebra, ODEs, plotting and more, plus verify_claim to check a stated result.

Features

  • 40 tools across symbolic and numeric mathematics
  • Persistent Sage worker per session
  • verify_claim proof ladder: proved, refuted, supported or undecided
  • Deny-by-default code policy checked against Sage's doctests
  • pip, conda-forge, Docker, .mcpb bundle and Helm installs
  • stdio or Streamable HTTP transport

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "SageMath MCP Server" tools will be available.
{
  "mcpServers": {
    "sagemath-mcp": {
      "command": "uvx",
      "args": [
        "--python",
        "3.12",
        "--from",
        "sagemath-mcp[passagemath]",
        "sagemath-mcp"
      ]
    }
  }
}

Description

SageMath MCP Server gives a language model a persistent, sandboxed SageMath worker instead of asking it to do algebra in its head. Each MCP session gets its own Sage process, so variables, functions and assumptions carry over between tool calls, and the 40 tools reach symbolic calculus, number theory, linear algebra, ODEs, plotting, combinatorics, graphs, groups, elliptic curves and more. One tool, verify_claim, re-checks a stated result through a ladder of methods and answers proved, refuted, supported or undecided, with its evidence.

Code sent to the worker is deny-by-default: imports, Sage's external CAS interfaces and file, display and persistence primitives are refused, while the policy accepts 98.9% of SageMath's own 438,124 documented doctest examples, measured on every CI run. The authors are explicit that this is not an operating-system boundary: a pip install runs with your privileges, so for untrusted or shared use they recommend the hardened container image.

The easiest route is the [passagemath] extra, a pip-installable SageMath runtime (about 1 GB, Python 3.12) that needs no Sage build; it also runs against an existing Sage, from conda-forge, as Docker images for amd64 and arm64, as a one-click .mcpb bundle for Claude Desktop, or via a Helm chart. stdio by default, Streamable HTTP on request. macOS and Linux; on Windows use the container or WSL. MIT-licensed, listed in the official MCP Registry.

New

A model-neutral coding runtime over MCP: file reading and search, atomic multi-file patches, command execution with a PTY, and git, confined to one workspace and gated by permission modes.

Vulnerability triage for AI agents: 28 security tools across 24 free intelligence sources — NVD, EPSS, CISA KEV, MITRE ATT&CK, Shodan and VirusTotal — behind a single triage_cve call.

New

Open-source MCP server that searches and downloads academic papers across arXiv, PubMed, Semantic Scholar, OpenAlex, Crossref and 20+ other sources, with an open-access-first download fallback.

Featured

Drive live Jupyter notebooks from an agent — read and edit cells, execute code, see rich outputs, and run against local JupyterLab or a cloud sandbox.

Browse all MCP servers →