Sage Math MCP Server

A universal mathematics Model Context Protocol (MCP) server that gives LLM clients full access to SageMath --- one of the most comprehensive open-source mathematics systems available. Built on FastMCP 3.x, the server maintains a dedicated SageMath process for each MCP session so variables, functions, and assumptions persist across tool calls. It runs locally over stdio via the published package.

People connecting this server to Claude, Cursor, VS Code, or another MCP client. The project is written in Python.

VERIFIED ACTIVE

LAST COMMIT 2026-08-24 · ★ 14 · #159 OF 848 MAINTAINED OTHER · VERIFIED 2026-08-25

MIT · Python servers · how we verify → /methodology

01 · Install Sage Math

Claude Code

claude mcp add xbp-europe-sagemath-mcp -- uvx sagemath-mcp

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "xbp-europe-sagemath-mcp": {
      "command": "uvx",
      "args": [
        "sagemath-mcp"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license MIT - declared in the repository

pypi package sagemath-mcp - check the name against the project README before installing (PyPI has no namespace ownership)

registry namespace io.github.XBP-Europe is GitHub-verified and matches the repo owner

03 · What Sage Math can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

Latest releases

v0.6.1 · 2026-08-16

A security patch on 0.6.0. It closes a critical sandbox escape introduced by the · curated import feature, hardens the validator against the same class, stops a · cross-client information leak in the monitoring…

v0.6.0 · 2026-08-15

A security and correctness release, and a large one. evaluate_sage now · runs SageMath rather than Python, caller code is checked against a · deny-by-default allowlist, and a run of sandbox escapes found over the…

v0.5.0 · 2026-08-14

Security · Caller strings interpolated into trusted code no longer reach sage_eval. Four · tool parameters -- graph_operation.graph, group_operation.group, · coding_theory_operation.code_type and…

04 · Who maintains Sage Math

SageMath is maintained by xbp-europe. It's the only MCP server we track from this author; the repo dates to Nov 2025.

05 · Facts

category
other - ranked #159 of 848 actively-maintained other servers as of 2026-08-25.
release cadence
4 releases in the last 90 days (latest 2026-08-16)
registry
io.github.XBP-Europe/sagemath-mcp (active, first published 2026-08-14 · 3 versions)
packages
pypi:sagemath-mcp

06 · Sage Math FAQ

What is Sage Math?

A universal mathematics Model Context Protocol (MCP) server that gives LLM clients full access to SageMath --- one of the most comprehensive open-source mathematics systems available. Built on FastMCP 3.x, the server maintains a dedicated SageMath process for each MCP session so variables, functions, and assumptions persist across tool calls. It runs locally over stdio via the published package.

Is Sage Math still maintained?

Yes - as of 2026-08-25, its last commit was 2026-08-24 and it shipped 4 releases in the last 90 days. We re-verify nightly.

How do I install Sage Math?

Run `uvx sagemath-mcp`. You can also paste the ready-made client config above.

Does Sage Math run locally?

Yes - it's a stdio server: it runs on your machine (via uvx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Sage Math

More MCP servers to compare · Token Enhancer · Helldivers2 MCP · Laugh Tale · Road Poneglyph · Claude Octopus

More Python MCP servers · Magpie Search · NoteStore Lab MCP · see all