
A powerful local MCP server for advanced mathematical computation, powered by Python and SymPy.
Part of the T-MCP Series by TMM Interactive
T-MCP Math is a local Model Context Protocol (MCP) server that gives AI assistants like Claude, GitHub Copilot, Cursor, and others access to a broad mathematical toolset — running entirely on your machine. No API keys, no cloud, no cost.
It goes well beyond simple calculations, giving your AI agent access to deep mathematics including symbolic computation, calculus, differential equations, number theory, and rich visualizations, all through natural language.
- Solve equations — algebraic equations for any variable, including polynomial and transcendental forms
- Simplify expressions — reduce symbolic expressions to their simplest form
- Solve systems of equations — linear and non-linear systems
- Solve linear systems (matrix form) — solve
Ax = Busing matrix methods
- Derivatives — symbolic differentiation with respect to any variable
- Integrals — indefinite and definite integrals with bounds
- Limits — one-sided and two-sided limits at any point
- Multivariable calculus — gradient, Jacobian, Hessian, divergence, curl, partial derivatives, Taylor series
- Multiple integrals — double and triple integrals with configurable bounds
- Find extrema — local minima and maxima via numerical optimization
- Find roots numerically — numerical root finding for arbitrary functions
- Solve ODEs — first-order ordinary differential equations numerically
- Solve systems of ODEs — coupled ODE systems
- Laplace transform — symbolic Laplace and inverse Laplace transforms
- Matrix operations — addition, multiplication, inverse, determinant, eigenvalues, and eigenvectors
- Descriptive statistics — mean, median, variance, standard deviation
- Advanced statistics — quartiles, IQR, mode, skewness, kurtosis
- Probability distributions — PDF and CDF for normal, binomial, Poisson, and more
- Linear regression — slope, intercept, and R² value
- Hypothesis testing — t-test, chi-squared test, ANOVA
- Correlation analysis — Pearson and Spearman correlation
- Prime checking — test whether any integer is prime
- Prime factorization — full prime factor decomposition
- GCD & LCM — greatest common divisor and least common multiple
- Advanced number theory — Euler’s phi function, modular inverse, Fibonacci, factorial, divisibility
- Congruence solving — solve
ax ≡ b (mod m) - Chinese Remainder Theorem — solve systems of congruences
- Complex operations — magnitude, phase, conjugate, real and imaginary parts, polar/rectangular conversion, arithmetic
- Complex roots — compute all n-th roots of a complex number
- Symbolic operations — expand, factor, collect, cancel, partial fractions, series expansion, substitution, inequality solving
- Expression evaluation — evaluate expressions with variable bindings
- LaTeX export — convert any expression to LaTeX notation
- Polygon area — calculate area from arbitrary vertices
- 2D distance — Euclidean distance between two points
- Line equations — derive the line equation from two points
- Function plots — 2D function graphs with configurable range
- Geometry plots — visualize points, lines, and circles
- Advanced plots — parametric, polar, 3D surface, histogram, boxplot, scatter, contour, and heatmap
- Unit conversion — convert values between common units
- Expression pre-parsing — handles implicit multiplication and natural math notation
- Python 3.10 or higher
pippackage manager
git clone https://github.com/TMM-Interactive/T-MCP-Math.git
cd T-MCP-Mathpip install -r requirements.txtpython mcp_server.pyThe server starts and listens on stdio, ready to connect to any MCP-compatible client.
Add the following to your claude_desktop_config.json:
macOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows:%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"t-mcp-math": {
"command": "python",
"args": ["/absolute/path/to/T-MCP-Math/mcp_server.py"]
}
}
}Restart Claude Desktop, and the math tools will appear automatically.
Add the following to your .vscode/mcp.json (workspace) or VS Code settings.json (global):
{
"mcp": {
"servers": {
"t-mcp-math": {
"type": "stdio",
"command": "python",
"args": ["/absolute/path/to/T-MCP-Math/mcp_server.py"]
}
}
}
}Then open GitHub Copilot Chat and switch to Agent mode using the @ menu.
Open Cursor Settings → MCP → Add new MCP server and use:
{
"t-mcp-math": {
"command": "python",
"args": ["/absolute/path/to/T-MCP-Math/mcp_server.py"]
}
}You can also add it directly to ~/.cursor/mcp.json.
Add the following to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"t-mcp-math": {
"command": "python",
"args": ["/absolute/path/to/T-MCP-Math/mcp_server.py"]
}
}
}Add this to your ~/.continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "python",
"args": ["/absolute/path/to/T-MCP-Math/mcp_server.py"]
}
}
]
}
}Once connected, you can use natural language to invoke the tools:
"Solve the equation x³ - 6x² + 11x - 6 = 0"
"Calculate the derivative of sin(x²) * e^x"
"Plot f(x) = x² - 4x + 3 from -2 to 6"
"Compute the Laplace transform of t * e^(-2t)"
"Run a Pearson correlation on these two datasets: [1,2,3,4] and [2,4,5,4]"
T-MCP Math is part of the T-MCP series — a collection of open-source, free, local MCP servers for specialized domains. You can check out the others here.
This project is licensed under the MIT License — free to use, modify, and distribute for any purpose, including commercial use. See LICENSE for details.
Developed and maintained by TMM Interactive.
TMM Interactive is a young tech company building software, web applications, and interactive digital experiences.
Made with ❤️ by TMM Interactive