Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI → MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE ↗ (opens in a new tab)
  • llms.txt ↗ (opens in a new tab)
  • Catalog JSON ↗ (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub ↗ (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. Developer Tools
  3. Sagemath MCP Server
  4. README

Sagemath MCP Server README

The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Sagemath MCP Server listing page.

Back to Sagemath MCP Server View source on GitHub

SageMath MCP Server

License: CC0-1.0 npm

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.

Why

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.

Tools

ToolDescription
sage_evaluateRun an arbitrary SageMath expression.
sage_solve_equationSolve algebraic / transcendental equations symbolically.
sage_differentiateCompute derivatives (any order, any variable).
sage_integrateIndefinite and definite integrals.
sage_simplifySimplify expressions (default, full, trig, rational).
sage_factorFactor polynomials or integers.
sage_matrix_opsDeterminant, inverse, eigenvalues, rank, RREF, transpose over QQ / RR / ZZ / CC.
sage_plotPlot an expression and return a base64 PNG.
sage_latex_convertConvert a SageMath expression to LaTeX.
sage_number_theoryis_prime, next_prime, factor, euler_phi, gcd, lcm, prime_range, sigma, moebius.

All tools follow the same schema pattern (see src/schemas/common.ts).

Installation

The server needs either a local SageMath install or Docker available on the host so it can spawn a SageMath process.

Option 1: npm + local SageMath

Terminal
npm install -g @justice8096/sagemath-mcp-server
# requires `sage` on PATH — see https://doc.sagemath.org/html/en/installation/
sagemath-mcp

Option 2: Docker (no local SageMath required)

Terminal
docker compose up
# uses the official sagemath/sagemath image; the server runs inside the container

Option 3: from source

bash
git clone https://github.com/justice8096/sagemath-mcp-server.git
cd sagemath-mcp-server
npm install
npm run build
npm start

Configuring an MCP client

Claude Desktop / Claude Code (stdio transport)

Add to ~/.claude.json (or the equivalent Claude Desktop config):

config.json
{
  "mcpServers": {
    "sagemath": {
      "command": "sagemath-mcp"
    }
  }
}

Remote / HTTP transport

bash
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.

Architecture

  • TypeScript wrapper, runtime is Node.js ≥ 18.
  • Subprocess wrapping — the wrapper code is CC0; SageMath remains GPL-3.0 and runs as a separate process, which is the canonical safe interaction model per the GNU GPL FAQ on aggregation. Embedding via FFI would propagate copyleft; subprocess execution does not.
  • Dual transport — stdio (Claude Desktop, Claude Code, local MCP clients) and Streamable HTTP (remote deployment, optional API_KEY env var).
  • i18n — English, Spanish, French via src/i18n.ts and locales/.
  • Multi-format build — 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.

Configuration

Env varDefaultPurpose
TRANSPORTstdiostdio or http.
PORT3000HTTP port when TRANSPORT=http.
API_KEY(none)If set, HTTP requests must include matching API_KEY header.
SAGE_TIMEOUT30000Per-call SageMath timeout in milliseconds.
SAGE_DOCKER_IMAGEsagemath/sagemath:latestImage used when SageMath isn't installed locally.

Security

  • All SageMath input is sanitized to strip shell metacharacters before subprocess execution; see src/services/sage-executor.ts.
  • HTTP transport requires API_KEY if set — there is no default credential.
  • See SECURITY.md and THREAT_MODEL.md for the full posture.
  • Pre-commit audit suite under audits/: SAST/DAST scan, supply-chain audit, CWE mapping, LLM-compliance report, contribution analysis.

License

This wrapper is released under CC0-1.0 (public domain). SageMath itself remains GPL-3.0; the subprocess execution model keeps the licenses independent. See SECURITY.md and the project's compliance analysis for the legal reasoning.

Status

v1.0.0 — public release. The wrapper layer is stable; the SageMath surface is feature-rich and stable upstream. File issues at https://github.com/justice8096/sagemath-mcp-server/issues.