# Math MCP Learning

Educational MCP server with math operations, statistics, visualizations, and persistent workspace.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add clouatre-labs/math-mcp

# Browse available tools
npx -y @smithery/cli@latest tool list clouatre-labs/math-mcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get clouatre-labs/math-mcp calculate

# Call a tool
npx -y @smithery/cli@latest tool call clouatre-labs/math-mcp calculate '{}'
```

## Direct MCP Connection

Endpoint: `https://math-mcp--clouatre-labs.run.tools`

**Optional config:**
- `math_timeout` (query) — Maximum time allowed to evaluate a math expression. Increase if you hit timeouts on complex expressions.
- `mcp_rate_limit_per_minute` (query) — Maximum number of tool calls per minute. Set to 0 to disable rate limiting.

## Tools (17)

- `calculate` — Safely evaluate mathematical expressions with support for basic operations and math functions.
- `statistics` — Perform statistical calculations on a list of numbers.
- `compound_interest` — Calculate compound interest for investments.
- `convert_units` — Convert between different units of measurement.
- `matrix_multiply` — Multiply two matrices (A × B).
- `matrix_transpose` — Transpose a matrix (swap rows and columns).
- `matrix_determinant` — Calculate the determinant of a square matrix.
- `matrix_inverse` — Calculate the inverse of a square matrix.
- `matrix_eigenvalues` — Calculate the eigenvalues of a square matrix.
- `save_calculation` — Save calculation to persistent workspace (survives restarts).
- `load_variable` — Load previously saved calculation result from workspace.
- `plot_function` — Generate mathematical function plots (requires matplotlib).
- `create_histogram` — Create statistical histograms (requires matplotlib).
- `plot_line_chart` — Create a line chart from data points (requires matplotlib).
- `plot_scatter_chart` — Create a scatter plot from data points (requires matplotlib).
- `plot_box_plot` — Create a box plot for comparing distributions (requires matplotlib).
- `plot_financial_line` — Generate and plot synthetic financial price data (requires matplotlib).

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get clouatre-labs/math-mcp <tool-name>
```

## Resources

- `math://test` — Simple test resource like FastMCP examples
- `math://functions` — List all available mathematical functions with examples and syntax help.
- `math://history` — Get the history of calculations performed across sessions.
- `math://workspace` — Get persistent calculation workspace showing all saved variables.
- `math://catalog/tools` — Catalog of all available tools with category, description, and example.
- `math://variables` — List all variable names saved in the workspace (lightweight alternative to math://workspace).

## Prompts (2)

- `math_tutor` (topic, level, include_examples) — Generate a structured math tutoring prompt for a mathematical concept at a chosen difficulty level, optionally includin…
- `formula_explainer` (formula, context) — Generate a comprehensive prompt for explaining a mathematical formula: variable definitions, contextual background, ste…
