MCP server wrapping SageMath's full computer algebra system — 10 symbolic-math tools for LLMs.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"sagemath": {
"command": "sagemath-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server wrapping SageMath's full computer algebra system — 10 symbolic-math tools for LLMs.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@justice8096/sagemath-mcp-server' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @justice8096/sagemath-mcp-server against OSV.dev.
Click any tool to inspect its schema.
This server is missing a description.If you've used it, help the community.
Add informationBe the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in other
Pi Coding Agent extension (CLI-first) — routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.
97% token reduction for AI coding sessions — zero deps, 21 languages, MCP server
App framework, testing framework, and inspector for MCP Apps.
MCP proxy that compresses prose fields (tool descriptions, etc.) using caveman rules. Same accuracy, fewer context tokens.
MCP Security Weekly
Get CVE alerts and security updates for io.github.justice8096/sagemath-mcp-server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol server that exposes SageMath — a 100+ package computer algebra system — to LLM clients such as Claude. Where most "math MCPs" wrap a single library (SymPy, mathjs), this one subprocess-wraps the entire SageMath stack so the model has access to genuine symbolic mathematics, not arithmetic.
LLMs are bad at exact arithmetic, brittle with multi-step algebra, and unreliable when symbolic manipulation matters. The right pattern is to keep the conceptual reasoning in the model and delegate mechanical computation to a tool — the same trick a person with dyscalculia uses with a calculator. SageMath gives you the broadest tool surface for that delegation: factoring, integration, eigenvalues, number theory, LaTeX rendering, and plotting all behind one interface.
| Tool | Description |
|---|---|
sage_evaluate | Run an arbitrary SageMath expression. |
sage_solve_equation | Solve algebraic / transcendental equations symbolically. |
sage_differentiate | Compute derivatives (any order, any variable). |
sage_integrate | Indefinite and definite integrals. |
sage_simplify | Simplify expressions (default, full, trig, rational). |
sage_factor | Factor polynomials or integers. |
sage_matrix_ops | Determinant, inverse, eigenvalues, rank, RREF, transpose over QQ / RR / ZZ / CC. |
sage_plot | Plot an expression and return a base64 PNG. |
sage_latex_convert | Convert a SageMath expression to LaTeX. |
sage_number_theory | is_prime, next_prime, factor, euler_phi, gcd, lcm, prime_range, sigma, moebius. |
All tools follow the same schema pattern (see src/schemas/common.ts).
The server needs either a local SageMath install or Docker available on the host so it can spawn a SageMath process.
npm install -g @justice8096/sagemath-mcp-server
# requires `sage` on PATH — see https://doc.sagemath.org/html/en/installation/
sagemath-mcp
docker compose up
# uses the official sagemath/sagemath image; the server runs inside the container
git clone https://github.com/justice8096/sagemath-mcp-server.git
cd sagemath-mcp-server
npm install
npm run build
npm start
Add to ~/.claude.json (or the equivalent Claude Desktop config):
{
"mcpServers": {
"sagemath": {
"command": "sagemath-mcp"
}
}
}
TRANSPORT=http API_KEY=your-secret-key npm start
Then point an MCP HTTP client at http://<host>:3000/mcp with the matching API_KEY header.
API_KEY env var).src/i18n.ts and locales/.build.ts emits Claude plugin, OpenAI function-calling, n8n node, MCP server descriptor, CLI tool, and YAML prompt-library outputs from the same source manifest.