A MCP server for symbolic manipulation of mathematical expressions
{
"mcpServers": {
"sympy-mcp": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A MCP server for symbolic manipulation of mathematical expressions
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
Apache-2.0. View license →
Is it maintained?
Last commit 21 days ago. 62 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Sympy Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Sympy-MCP is a Model Context Protocol server for allowing LLMs to autonomously perform symbolic mathematics and computer algebra. It exposes numerous tools from SymPy's core functionality to MCP clients for manipulating mathematical expressions and equations.
Language models are absolutely abysmal at symbolic manipulation. They hallucinate variables, make up random constants, permute terms and generally make a mess. But we have computer algebra systems specifically built for symbolic manipulation, so we can use tool-calling to orchestrate a sequence of transforms so that the symbolic kernel does all the heavy lifting.
While you can certainly have an LLM generate Mathematica or Python code, if you want to use the LLM as an agent or on-the-fly calculator, it's a better experience to use the MCP server and expose the symbolic tools directly.
The server exposes a subset of symbolic mathematics capabilities including algebraic equation solving, integration and differentiation, vector calculus, tensor calculus for general relativity, and both ordinary and partial differential equations.
For example, you can ask it in natural language to solve a differential equation:
Solve the damped harmonic oscillator with forcing term: the mass-spring-damper system described by the differential equation where m is mass, c is the damping coefficient, k is the spring constant, and F(t) is an external force.
$$ m\frac{d^2x}{dt^2} + c\frac{dx}{dt} + kx = F(t) $$
Or involving general relativity:
Compute the trace of the Ricci tensor $R_{\mu\nu}$ using the inverse metric $g^{\mu\nu}$ for Anti-de Sitter spacetime to determine its constant scalar curvature $R$.
You need uv first.
brew install uvcurl -LsSf https://astral.sh/uv/install.sh | shThen you can install and run the server with the following commands:
# Setup the project
git clone https://github.com/sdiehl/sympy-mcp.git
cd sympy-mcp
uv sync
# Install the server to Claude Desktop
uv run mcp install server.py
# Run the server
uv run mcp run server.py
You should see the server available in the Claude Desktop app now. For other clients, see below.
If you want a completely standalone version that just runs with a single command, you can use the following. Note this is running arbitrary code from Github, so be careful.
uv run --with https://github.com/sdiehl/sympy-mcp/releases/download/0.1/sympy_mcp-0.1.0-py3-none-any.whl python server.py
If you want to do general relativity calculations, you need to install the einsteinpy library.
uv sync --group relativity
The sympy-mcp server provides the following tools for symbolic mathematics:
| Tool | Tool ID | Description |
|------|-------|-------------|
| Variable Introduction | intro | Introduces a variable with specified assumptions and stores it |
| Multiple Variables | intro_many | Introduces multiple variables with specified assumptions simultaneously |
| Expression Parser | introduce_expression | Parses an expression string using available local variables and stores it |
| LaTeX Printer | print_latex_expression | Prints a stored expression in LaTeX format, along with variable assumptions |
| Algebraic Solver | solve_algebraically | Solves an equation algebraically for a given variable over a given domain |
| Linear Solver | solve_linear_system | Solves a system of linear equations |
| Nonlinear Solver | solve_nonlinear_system | Solves a system of nonlinear equations |
| Function Variable | introduce_function | Introduces a function variable for use in differential equations |
| ODE Solver | dsolve_ode | Solves an ordinary differential equation |
| PDE Solver | `pdsolve_pd