Math MCP Learning Server

Educational MCP server offering persistent workspace, math evaluation, statistics, plotting, and matrix operations.
  • python

2

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You are about to run an Educational MCP server that demonstrates persistent workspace patterns and mathematical operations. This server lets you perform safe calculations, keep cross-session variables, plot functions, visualize statistics, and even handle matrix operations when you enable scientific features. It is designed to be used with any MCP client to explore math concepts interactively across sessions and devices.

How to use

You can connect any MCP client that speaks the MCP protocol to either the hosted cloud instance or a local installation. In cloud mode, you point your MCP client to the provided HTTP endpoint and start sending math queries, persistent storage requests, and visualization commands. In local mode, you run the server on your machine and connect using your MCP client just like you would with any other MCP server.

How to install

Prerequisites you need before installing the server include a working Python environment and a compatible MCP client. You may also use a helper tool to simplify local execution.

Cloud deployment without installation is supported. You only need an MCP client and the hosted endpoint.

Local installation options follow. Choose one of the following paths to run the server locally.

{
  "mcpServers": {
    "math_cloud": {
      "transport": "http",
      "url": "https://math-mcp.fastmcp.app/mcp"
    }
  }
}
# Basic installation
uv pip install math-mcp-learning-server

# With matrix operations support
uv pip install math-mcp-learning-server[scientific]

# With visualization support
uv pip install math-mcp-learning-server[plotting]

# All features
uv pip install math-mcp-learning-server[scientific,plotting]

Automatic local setup with uvx is recommended. This lets you start the server with a single command once the package is installed.

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

If you prefer to run the development server directly from source, use the following development command to launch the server locally for testing and exploration.

uv run fastmcp dev src/math_mcp/server.py

Configuration and notes

The server exposes two connection methods: a cloud HTTP endpoint for hosted usage and a local stdio-based runtime for development and testing. Cross-session persistence works across all transports, ensuring variables persist through restarts and session changes.

Key capabilities include safe expression evaluation, statistical analysis, unit conversions, plotting, and matrix operations when enabled. The system uses strict validation to ensure inputs are well-formed and secure.

Security and best practices

All inputs are validated using a type-aware model. Expressions are evaluated in a restricted environment to prevent unsafe operations. Errors are handled gracefully without exposing sensitive information. File operations are limited to designated workspace directories to minimize risk.

When using the cloud endpoint, ensure you trust the hosting provider and enforce least-privilege access in your MCP client configuration. For local runs, review any file paths used by your workspace to avoid unintended data exposure.

Examples and tips

Use the persistent workspace to save calculations and retrieve them in future sessions. Explore mathematical functions with the safe evaluator, and visualize results with the built-in plotting tools to gain intuition about data and formulas.

Available tools

save_calculation

Save calculations to persistent storage for cross-session access

load_variable

Access previously saved calculations from any MCP client session

calculate

Safely evaluate mathematical expressions with basic operators and functions

statistics

Compute mean, median, mode, standard deviation, and variance

compound_interest

Calculate compound interest for investments with formatted output

convert_units

Convert between units for length, weight, and temperature

plot_function

Generate base64-encoded PNG plots of mathematical functions

create_histogram

Create statistical histograms with distribution indicators

plot_line_chart

Create line charts for sequential data visualization

plot_scatter_chart

Create scatter plots to analyze relationships between variables

plot_box_plot

Create box plots for comparing distributions

plot_financial_line

Plot financial trends with annotations such as bullish/bearish patterns

matrix_multiply

Multiply two matrices with dimension validation (requires scientific features)

matrix_transpose

Transpose a matrix to swap rows and columns

matrix_determinant

Compute the determinant of a square matrix

matrix_inverse

Compute the inverse of a matrix with singularity checks

matrix_eigenvalues

Calculate eigenvalues, including complex numbers

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational