sagemath-mcp

XBP-Europe/sagemath-mcp
★ 12 stars Python AI/LLM Updated 3mo ago ✗ Risk
Stateful SageMath MCP server: 37 tools for symbolic math, algebra, number theory, graphs and plotting. A persistent Sage session per client, an AST policy in front of it, and a hardened container as the real boundary.
View on GitHub → 🛡️ Security & TRiSM Audit →

⚡ What This Server Does & Key Capabilities

The sagemath-mcp Model Context Protocol (MCP) server provides seamless integration between AI assistants (such as Claude Desktop, Cursor, and Claude Code) and Stateful SageMath MCP server: 37 tools for symbolic math, algebra, number theory, graphs and plotting. A persistent Sage session per client, an AST policy in front of it, and a hardened container as the real boundary. By connecting this server, your AI agent gains specialized capabilities to inspect, query, and automate tasks within the AI/LLM domain.

Core Agent Capabilities

💡 Example Prompts to Ask Your AI Agent

Once installed in Claude Desktop or Cursor, try asking your assistant:

"Route this complex analysis task to the connected model and return a structured JSON report."
"Compare the reasoning outputs between two connected models and highlight any discrepancies."

Compatible AI Clients

🟣 Claude Desktop ⚡ Cursor IDE 💻 Claude Code CLI 🌊 Windsurf 🤖 Gemini CLI

Quick Install

Copy the config for your editor. Verify environment variables or setup notes in the README.

Add to claude_desktop_config.json:

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

Or install with pip: pip install sagemath-mcp

⚡
Building Production MCP Agents? PRO TOOLKITS
Get the Complete 31,400+ MCP Ecosystem Dataset ($29) or the FastMCP + TypeScript Starter Kit ($39) with turnkey Docker & Cloudflare deployment.

README Documentation

<!-- mcp-name: io.github.XBP-Europe/sagemath-mcp --> 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.

View Full Documentation & Updates on GitHub ↗

Tools (20)

INFOSAGEMATH_MCP_EVAL_TIMEOUTSAGEMATH_MCP_FORCE_PYTHON_WORKERSAGEMATH_MCP_IDLE_TTLSAGEMATH_MCP_MAX_STDOUTSAGEMATH_MCP_PURE_PYTHONSAGEMATH_MCP_SAGE_BINARYSAGEMATH_MCP_SECURITY_ALLOWED_IMPORTSSAGEMATH_MCP_SECURITY_ALLOWED_IMPORT_PREFIXESSAGEMATH_MCP_SECURITY_ALLOW_IMPORTSSAGEMATH_MCP_SECURITY_ENABLEDSAGEMATH_MCP_SECURITY_FORBID_GLOBALSAGEMATH_MCP_SECURITY_FORBID_NONLOCALSAGEMATH_MCP_SECURITY_LOG_VIOLATIONSSAGEMATH_MCP_SECURITY_MAX_AST_DEPTHSAGEMATH_MCP_SECURITY_MAX_AST_NODESSAGEMATH_MCP_SECURITY_MAX_SOURCESAGEMATH_MCP_SHUTDOWN_GRACESAGEMATH_MCP_STARTUPboolean_algebra_operation

Topics

ai-toolscasclaudecomputer-algebrafastmcpllmmathmathematicsmcpmcp-servermodel-context-protocolpythonsagesagemathsymbolic-computation
📊
Building AI Agents or Backtesting Quant Models?
Get the Polymarket Historical Dataset — 23.0M+ 15-minute price & orderbook snapshots across 18,400+ prediction markets. Clean CSV & SQLite download for backtesting & agent training.
Buy Dataset ($19) → View Sample →