sagemath-mcp
Model Context Protocol server that provides stateful SageMath computations.
Model Context Protocol server that provides stateful SageMath computations.
To install this package, run one of the following:
A Model Context Protocol (MCP) server that gives a language model a sandboxed mathematical subset of SageMath: 40 stateful tools for symbolic calculus, algebra, number theory, graphs, groups, elliptic curves, plotting and claim verification. Each MCP session gets a dedicated Sage worker process, so variables, functions and assumptions persist across tool calls. Caller code is deny-by-default: a name is refused unless the generated allowlist offers it or the caller's own code bound it.
A SageMath runtime is REQUIRED at run time and is deliberately not a
dependency of this package: sage must be on PATH (conda-forge ships
sage, which is the usual way to get it), or the pip extra
sagemath-mcp[passagemath] can supply one. Making Sage a hard dependency
would force a multi-gigabyte install on users who run the project's
hardened container instead.
Summary
Model Context Protocol server that provides stateful SageMath computations.
Last Updated
Oct 27, 2026 at 08:00
License
MIT
Supported Platforms
GitHub Repository
https://github.com/XBP-Europe/sagemath-mcp