SageMath

v0.12.0
io.github.XBP-Europe/sagemath-mcp Checked 2 days ago Published 3 days ago

Stateful SageMath MCP server with 40 tools and a sandboxed Sage session per client.

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add sagemath-mcp -- uvx sagemath-mcp==0.12.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "sagemath-mcp": {
      "args": [
        "sagemath-mcp==0.12.0"
      ],
      "command": "uvx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "sagemath-mcp": {
      "args": [
        "sagemath-mcp==0.12.0"
      ],
      "command": "uvx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "sagemath-mcp": {
      "args": [
        "sagemath-mcp==0.12.0"
      ],
      "command": "uvx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.sagemath-mcp]
command = "uvx"
args = ["sagemath-mcp==0.12.0"]

Docker

Requires Docker

Run in a terminal
claude mcp add sagemath-mcp -- docker run -i --rm ghcr.io/xbp-europe/sagemath-mcp:0.12.0 --transport stdio
Add to claude_desktop_config.json
{
  "mcpServers": {
    "sagemath-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/xbp-europe/sagemath-mcp:0.12.0",
        "--transport",
        "stdio"
      ],
      "command": "docker"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "sagemath-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/xbp-europe/sagemath-mcp:0.12.0",
        "--transport",
        "stdio"
      ],
      "command": "docker"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "sagemath-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/xbp-europe/sagemath-mcp:0.12.0",
        "--transport",
        "stdio"
      ],
      "command": "docker",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.sagemath-mcp]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/xbp-europe/sagemath-mcp:0.12.0", "--transport", "stdio"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: solve_equation, matrix_multiply, matrix_operation, boolean_algebra_operation, polynomial_ring_operation, differentiate_expression, integrate_expression, limit_expression, ….
  4. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json