Sagemath MCP Server
What it does
MCP server wrapping SageMath's full computer algebra system — 10 symbolic-math tools for LLMs.
- Connects パソコンで動く
- Account or key Needs API_KEY
- Category 検索・AIの記憶
インストール
使っているAIアプリを選んで、設定をコピーしてください。
チェック 2/2 合格 · あなたのパソコンで動きます
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
Sagemath MCP Server に登録してキーを作る
提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。
キーの取り方は下の提供元 README にあります
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
{ "mcpServers": { "sagemath": { "command": "npx", "args": [ "-y", "@justice8096/sagemath-mcp-server" ], "env": { "SAGE_TIMEOUT": "your-value", "SAGE_DOCKER_IMAGE": "your-value", "TRANSPORT": "your-value", "PORT": "your-value", "API_KEY": "your-value" } } } }キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
Claude を終了してもう一度開く
試してみる
Sagemath MCP Server を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が Sagemath MCP Server を使っていると言うか、回答に Sagemath MCP Server のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ Sagemath MCP Server につなげません
Sagemath MCP Server はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · Sagemath MCP Server につなげるアプリを使う
- Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ)
- Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ)
- Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ)
B · 検索・AIの記憶 の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Context7✓ ChatGPT
- AIHOT✓ ChatGPT
- Sui Knowledge Base (kapa.ai)✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ)
Sagemath MCP Server に登録してキーを作る
提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。
キーの取り方は下の提供元 README にあります
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
claude mcp add --scope user sagemath --env SAGE_TIMEOUT=your-value --env SAGE_DOCKER_IMAGE=your-value --env TRANSPORT=your-value --env PORT=your-value --env API_KEY=your-value -- npx -y @justice8096/sagemath-mcp-serverEnter の前に「your-value」を自分のキーに書き換えてください
キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
Claude Code で /mcp と入力
Sagemath MCP Server が一覧にあり、接続済みと表示されれば OK です
試してみる
Sagemath MCP Server を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が Sagemath MCP Server を使っていると言うか、回答に Sagemath MCP Server のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ)
Sagemath MCP Server に登録してキーを作る
提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。
キーの取り方は下の提供元 README にあります
キーを入力
Sagemath MCP Server の設定で SAGE_TIMEOUT, SAGE_DOCKER_IMAGE, TRANSPORT, PORT, API_KEY が空です。自分のキーを入れて保存します
キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
Cursor の AI チャットを Agent モードで開く
試してみる
Sagemath MCP Server を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が Sagemath MCP Server を使っていると言うか、回答に Sagemath MCP Server のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
Sagemath MCP Server のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Node.js を入れてください(1 回だけ)
Sagemath MCP Server に登録してキーを作る
提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。
キーの取り方は下の提供元 README にあります
キーを入力
Sagemath MCP Server の設定で SAGE_TIMEOUT, SAGE_DOCKER_IMAGE, TRANSPORT, PORT, API_KEY が空です。自分のキーを入れて保存します
キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
VS Code の AI チャットを Agent モードで開く
試してみる
Sagemath MCP Server を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が Sagemath MCP Server を使っていると言うか、回答に Sagemath MCP Server のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください
JSON 設定は下の「開発者向け」にあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
claude mcp add --scope user sagemath --env SAGE_TIMEOUT=your-value --env SAGE_DOCKER_IMAGE=your-value --env TRANSPORT=your-value --env PORT=your-value --env API_KEY=your-value -- npx -y @justice8096/sagemath-mcp-serverClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"sagemath": {
"command": "npx",
"args": [
"-y",
"@justice8096/sagemath-mcp-server"
],
"env": {
"SAGE_TIMEOUT": "your-value",
"SAGE_DOCKER_IMAGE": "your-value",
"TRANSPORT": "your-value",
"PORT": "your-value",
"API_KEY": "your-value"
}
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"sagemath": {
"command": "npx",
"args": [
"-y",
"@justice8096/sagemath-mcp-server"
],
"env": {
"SAGE_TIMEOUT": "your-value",
"SAGE_DOCKER_IMAGE": "your-value",
"TRANSPORT": "your-value",
"PORT": "your-value",
"API_KEY": "your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"sagemath": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@justice8096/sagemath-mcp-server"
],
"env": {
"SAGE_TIMEOUT": "your-value",
"SAGE_DOCKER_IMAGE": "your-value",
"TRANSPORT": "your-value",
"PORT": "your-value",
"API_KEY": "your-value"
}
}
}
}自分で入力する値
SAGE_TIMEOUTenvPer-call SageMath timeout in milliseconds. Default 30000.SAGE_DOCKER_IMAGEenvDocker image used when SageMath is not installed locally. Default sagemath/sagemath:latest.TRANSPORTenvTransport mode: 'stdio' (default) or 'http'.PORTenvHTTP port when TRANSPORT=http. Default 3000.API_KEY秘密 envIf set, HTTP transport requires matching API_KEY header. Ignored for stdio.
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月12日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント justice8096 で確認済みです
- ✓ 合格
今もメンテナンスされている
コードの最終更新:25 日前
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
検索・AIの記憶のほかのサーバーとの比較i
- このカテゴリのほかの5973件のうち76%よりスターが多い
- このカテゴリのほかの5973件のうち12%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの5973件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Sagemath MCP Serverは安全ですか?
当てはまる基本チェック2項目のうち2項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
入力が必要なもの:API_KEY
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は25 日前、最新バージョン(1.0.1)がレジストリに届いたのは6 か月前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
代わりに使えるものは?
同じカテゴリには:Context7, Codebase Memory, Ruflo
同じカテゴリのほかの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Codebase Memory
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
SageMath MCP Server
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
| 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).
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
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)
docker compose up
uses the official sagemath/sagemath image; the server runs inside the container
Option 3: from source
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):
{
"mcpServers": { "sagemath": { "command": "sagemath-mcp" } } }
Remote / HTTP transport
TRANSPORT=http API_KEY=your-secret-key npm start
Then point an MCP HTTP client at http:// :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_KEYenv var). - i18n — English, Spanish, French via
src/i18n.tsandlocales/. - Multi-format build —
build.tsemits Claude plugin, OpenAI function-calling, n8n node, MCP server descriptor, CLI tool, and YAML prompt-library outputs from the same source manifest.
Configuration
| Env var | Default | Purpose |
|---|---|---|
TRANSPORT | stdio | stdio or http. |
PORT | 3000 | HTTP port when TRANSPORT=http. |
API_KEY | (none) | If set, HTTP requests must include matching API_KEY header. |
SAGE_TIMEOUT | 30000 | Per-call SageMath timeout in milliseconds. |
SAGE_DOCKER_IMAGE | sagemath/sagemath:latest | Image 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_KEYif set — there is no default credential. - See
SECURITY.mdandTHREAT_MODEL.mdfor 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.