Math MCP Learning

io.github.clouatre-labs由 GitHub 账号 clouatre-labs 发布v0.12.5更新于 Oct 24, 2026

Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace

已验证Streamable HTTP可网页运行数据与分析AI 与机器学习

概览

AI 生成的概览

一个教育用途的数学服务器,为助手提供 17 个工具,用于计算、统计、矩阵、单位换算、绘图和持久工作区。

可以做什么
计算表达式、统计量、复利和单位换算(长度、重量、温度)。执行矩阵运算:乘法、转置、行列式、逆矩阵和特征值。生成函数图、直方图、折线图、散点图、箱线图以及合成的金融价格走势图。在持久工作区中保存和读取计算结果,并提供工作区摘要、历史、函数、常量和变量等资源。提供辅导和公式讲解提示。
适用场景
适合教学、作业辅导或需要助手进行数值计算、单位换算、矩阵运算或生成图表的场景,无需依赖外部服务。托管端点适合不想本地安装的用户。
运行要求
可使用托管的 HTTP 端点,或通过 uvx 从 PyPI 包 math-mcp-learning-server 本地安装。绘图工具需要 matplotlib,因此需安装绘图或科学计算附加组件。未声明认证、API 密钥或环境变量。
安装前请注意
工作区工具会把计算结果写入重启后仍保留的持久存储,避免保存敏感数据。金融绘图工具只生成合成数据,并非真实市场数据。表达式求值使用带白名单的受限 eval,但本质上仍是求值器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Math MCP Learning,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.clouatre-labs%2Fmath-mcp-learning-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "math-learning": {
      "type": "http",
      "url": "https://math-mcp.fastmcp.app/mcp"
    }
  }
}

README

math-mcp-learning-server

[PyPI] [Python] [License] [REUSE] [OpenSSF Best Practices]

Educational MCP server with 17 tools, persistent workspace, and cloud hosting. Built with FastMCP and the official Model Context Protocol Python SDK.

Available on the MCP Registry (io.github.clouatre-labs/math-mcp-learning-server) and PyPI.

Demo

[math-mcp Demo]

See CONTRIBUTING.md for instructions to record your own demo.

Quick Start

Cloud (No Installation)

Connect your MCP client to the hosted server:

Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "math-cloud": {      "transport": "http",      "url": "https://math-mcp.fastmcp.app/mcp"    }  }}

Local Installation

json
{  "mcpServers": {    "math": {      "command": "uvx",      "args": ["math-mcp-learning-server[scientific,plotting]"]    }  }}

For other installation options (basic, scientific-only, plotting-only), see CONTRIBUTING.md.

Tools

CategoryToolDescription
Workspaceworkspace_saveSave calculations to persistent storage
workspace_loadRetrieve previously saved calculations
Mathcalc_expressionSafely evaluate mathematical expressions
calc_statisticsStatistical analysis (mean, median, mode, std_dev, variance)
calc_interestCalculate compound interest for investments
calc_unitsConvert between units (length, weight, temperature)
Matrixmatrix_multiplyMultiply two matrices
matrix_transposeTranspose a matrix
matrix_determinantCalculate matrix determinant
matrix_inverseCalculate matrix inverse
matrix_eigenvaluesCalculate eigenvalues
Visualizationplot_functionPlot mathematical functions
plot_histogramCreate statistical histograms
plot_line_chartCreate line charts
plot_scatterCreate scatter plots
plot_box_plotCreate box plots
plot_financial_lineCreate financial line charts

Resources

  • math://workspace - Persistent calculation workspace summary
  • math://history - Chronological calculation history
  • math://functions - Available mathematical functions reference
  • math://constants/{constant} - Mathematical constants (pi, e, golden_ratio, etc.)
  • math://catalog/tools - Tool catalog with metadata and usage examples
  • math://variables - Active variables in the current workspace
  • math://test - Server health check

Prompts

  • math_tutor - Structured tutoring prompts (configurable difficulty)
  • formula_explainer - Formula explanation with step-by-step breakdowns

See Usage Examples for detailed examples.

Development

See CONTRIBUTING.md for development setup, testing, and contribution guidelines.

Security

  • OpenSSF Best Practices Silver - Fewer than 1% of open source projects reach this level
  • REUSE/SPDX - License compliance for all files
  • Signed Commits - GPG-signed commits required
  • Dependency Scanning - Automated updates via Renovate
  • pip-audit CVE Scanning - Automated dependency vulnerability checks
  • gitleaks Secret Scanning - Detects secrets in code and history
  • zizmor GitHub Actions Security - Workflow security scanning
  • commitlint Enforcement - Conventional commit validation in CI
  • OpenSSF Scorecard - Continuous open source security assessment
calc_expression safety

The calc_expression tool uses restricted eval() with a whitelist of allowed characters and functions, restricted global scope (only math module and abs), and no access to dangerous built-ins or imports. All tool inputs are validated with Pydantic models. File operations are restricted to the designated workspace directory. Complete type hints and validation are enforced for all operations.

Documentation

来源:README.md,提交 4ceaf7d

工具

17

calc_expression

Mathematical Calculator

Safely evaluate mathematical expressions with support for basic operations and math functions. Supported operations: +, -, *, /, **, () Supported functions: sin, cos, tan, log, sqrt, abs, pow

输入参数expression必填

calc_statistics

Statistical Analysis

Perform statistical calculations on a list of numbers. Available operations: mean, median, mode, std_dev, variance

输入参数numbers必填operation必填

calc_interest

Compound Interest Calculator

Calculate compound interest for investments. Formula: A = P(1 + r/n)^(nt) Where: - P = principal amount - r = annual interest rate (as decimal) - n = number of times interest compounds per year - t = time in years

输入参数rate必填time必填principal必填compounds_per_year

calc_units

Unit Converter

Convert between different units of measurement. Supported unit types: - length: mm, cm, m, km, in, ft, yd, mi - weight: g, kg, oz, lb - temperature: c, f, k (Celsius, Fahrenheit, Kelvin)

输入参数value必填to_unit必填from_unit必填unit_type必填

matrix_multiply

Matrix Multiplication

Multiply two matrices (A × B).

输入参数matrix_a必填matrix_b必填

matrix_transpose

Matrix Transpose

Transpose a matrix (swap rows and columns).

输入参数matrix必填

matrix_determinant

Matrix Determinant

Calculate the determinant of a square matrix.

输入参数matrix必填

matrix_inverse

Matrix Inverse

Calculate the inverse of a square matrix.

输入参数matrix必填

matrix_eigenvalues

Matrix Eigenvalues

Calculate the eigenvalues of a square matrix.

输入参数matrix必填

workspace_save

Save Calculation to Workspace

Save calculation to persistent workspace (survives restarts).

输入参数name必填result必填expression必填

workspace_load

Load Variable

Load previously saved calculation result from workspace.

输入参数name必填

plot_function

Function Plotter

Generate mathematical function plots (requires matplotlib).

输入参数x_range必填expression必填num_points

plot_histogram

Statistical Histogram

Create statistical histograms (requires matplotlib).

输入参数binsdata必填title

plot_line_chart

Line Chart

Create a line chart from data points (requires matplotlib).

输入参数colortitlex_data必填y_data必填x_labely_labelshow_grid

plot_scatter

Scatter Plot

Create a scatter plot from data points (requires matplotlib).

输入参数colortitlex_data必填y_data必填x_labely_labelpoint_size

plot_box_plot

Box Plot

Create a box plot for comparing distributions (requires matplotlib).

输入参数colortitley_labeldata_groups必填group_labels

plot_financial_line

Financial Line Chart

Generate and plot synthetic financial price data (requires matplotlib). Creates realistic price movement patterns for educational purposes. Does not use real market data.

输入参数dayscolortrendstart_price

版本历史

1
  1. v0.12.5最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。