Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-server-sagemath": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
基于 Model Context Protocol (MCP) 的本地 SageMath 服务端,当前提供两项工具:
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be 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 education / developer-tools
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP server for accessing Figma plugin console logs and screenshots via Cloudflare Workers or local mode
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Sagemath and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
基于 Model Context Protocol (MCP) 的本地 SageMath 服务端,当前提供两项工具:
sagemath_version:查询本地 SageMath 版本。sagemath_evaluate:执行 SageMath 脚本并返回标准输出/错误。sagemath_health:轻量级自检,验证 SageMath 可用性。项目处于早期预览阶段(v0.0.1)。
GET /mcp 与 POST /mcp)。项目在运行时按照以下优先级查找 SageMath 可执行文件:
src/config.ts 中的 config.sagePath(若设置为非空字符串)。SAGE_PATH。sage 命令。默认情况下,config.sagePath 会读取 SAGE_PATH 环境变量的值;如需固定路径,可在该文件内显式填写,例如:
export const config = {
sagePath: "/opt/sage/bin/sage",
};
npm install
npm run buildnode dist/index.jsnpx -y tsx src/test/stdio-client.ts
MCP_TRANSPORT=http npm run dev
http://localhost:3000/mcp,可通过 PORT 环境变量调整端口。MCP_TRANSPORT=http npx -y tsx src/test/client.ts
GET /mcp:用于 SSE/流式 JSON-RPC。POST /mcp:标准 JSON-RPC over HTTP。{
"mcpServers": {
"sagemath-server": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-sagemath/dist/index.js"],
"autoApprove": ["sagemath_version", "sagemath_evaluate"],
"env": {
// "SAGE_PATH": "/absolute/path/to/sage" // 可选
}
}
}
}
{
"mcpServers": {
"sagemath-server-http": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-sagemath/dist/index.js"],
"env": {
"MCP_TRANSPORT": "http",
"PORT": "3000"
}
}
}
}
sagemath_versionstdout, stderr, exitCode, durationMs, timedOut。sagemath_evaluatecode (string) — 必填,SageMath 脚本。timeoutMs (number) — 可选,超时时间,默认 10000 ms。sagemath_healthprint(1+1)。ok(布尔)、message(字符串)、details(包含 stdout/stderr/exitCode 等)。npx -y tsx src/test/stdio-client.tsMCP_TRANSPORT=http npx -y tsx src/test/client.tsstructuredContent(JSON 对象),并附带简短文本提示;不再需要从 content[0].text 手动 JSON 解析。sagemath_health 确认 SageMath 可用,再调用其他工具。http://localhost:3000/mcp(可改 PORT)。支持 GET /mcp(SSE/流式 JSON-RPC)与 POST /mcp。node dist/index.js(或开发模式 npx -y tsx src/index.ts)。sagemath_evaluate 可执行任意 Sage 代码;HTTP 模式建议放在受控网络或加鉴权/限流。~/.config/modelcontext/mcp.json 里增加:
{
"mcpServers": {
"sagemath-server": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-sagemath/dist/index.js"],
"autoApprove": ["sagemath_version", "sagemath_evaluate", "sagemath_health"],
"env": {
// "SAGE_PATH": "/absolute/path/to/sage"
}
}
}
}
希望走 HTTP 时,可改用:
{
"mcpServers": {
"sagemath-server-http": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-sagemath/dist/index.js"],
"env": {
"MCP_TRANSPORT": "http",
"PORT": "3000"
},
"client": {
"url": "http://localhost:3000/mcp"
}
}
}
}
若希望 Claude 直接以 STDIO 启动:
{
"mcpServers": {
"sagemath-server": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-sagemath/dist/index.js"],
"autoApprove": ["sagemath_version", "sagemath_evaluate", "sagemath_heal
... [View full README on GitHub](https://github.com/GaloisHLee/mcp-server-sagemath#readme)