Atlas / MCP servers / sdiehl / SymPy

SymPyCAUTION

mcp/sdiehl/sympy

A MCP server for symbolic manipulation of mathematical expressions

Verdict
CAUTION
Grade
B
Trust score
89 /100
Exposed tools
32 26r · 5w · 1d
Transport
streamable-http
License
Apache-2.0
Stars
85
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

This library is no longer maintained. It is Apache licensed, so feel free to fork it.

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.

Why?

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$.

Usage

You need uv first.

  • Homebrew : brew install uv
  • Curl : curl -LsSf https://astral.sh/uv/install.sh | sh

Then

Read from source at commit 94c8d79b8512OBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add sympy-mcp -- uvx sympy-mcp
claude-desktop
{
  "mcpServers": {
    "sympy-mcp": {
      "command": "uvx",
      "args": [
        "sympy-mcp"
      ]
    }
  }
}
03

Exposed tools (32)

26 read · 5 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
calculate_curlreadCalculates the curl of a vector field using SymPy
calculate_divergencereadCalculates the divergence of a vector field using SymPy
calculate_gradientreadCalculates the gradient of a scalar field using SymPy
calculate_tensorreadCalculates a tensor from a metric using einsteinpy.symbolic.
convert_to_unitsreadConverts a quantity to the given target units using sympy.physics.units.convert_to.
create_coordinate_systemwriteCreates a 3D coordinate system for vector calculus operations.
create_custom_metricwriteCreates a custom metric tensor from provided components and symbols.
create_matrixwriteCreates a SymPy matrix from the provided data.
create_predefined_metricwriteCreates a predefined spacetime metric from einsteinpy.symbolic.predefined.
create_vector_fieldwriteCreates a vector field in the specified coordinate system.
differentiate_expressionreadDifferentiates an expression with respect to a variable using SymPy
dsolve_odereadSolves an ordinary differential equation using SymPy
integrate_expressionreadIntegrates an expression with respect to a variable using SymPy
introreadIntroduces a sympy variable with specified assumptions and stores it.
intro_manyreadIntroduces multiple sympy variables with specified assumptions and stores them.
introduce_expressionreadParses a sympy expression string using available local variables and stores it. Assigns it to either a temporary name (expr_0, expr_1, etc.) or a user-specified global name.
introduce_functionreadIntroduces a SymPy function variable and stores it.
matrix_determinantreadCalculates the determinant of a matrix using SymPy
matrix_eigenvaluesreadCalculates the eigenvalues of a matrix using SymPy
matrix_eigenvectorsreadCalculates the eigenvectors of a matrix using SymPy
matrix_inversereadCalculates the inverse of a matrix using SymPy
pdsolve_pdereadSolves a partial differential equation using SymPy
print_latex_expressionreadPrints a stored expression in LaTeX format, along with variable assumptions.
print_latex_tensorreadPrints a stored tensor expression in LaTeX format.
quantity_simplify_unitsreadSimplifies a quantity with units using sympy
reset_statedestructiveResets the state of the SymPy MCP server.
search_predefined_metricsreadSearches for predefined metrics in einsteinpy.symbolic.predefined.
simplify_expressionreadSimplifies a mathematical expression using SymPy
solve_algebraicallyreadSolves an equation (expression = 0) algebraically for a given variable.
solve_linear_systemreadSolves a system of linear equations using SymPy
solve_nonlinear_systemreadSolves a system of nonlinear equations using SymPy
substitute_expressionreadSubstitutes a variable in an expression with another expression using SymPy
04

Trust audit

CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (4 observation(s))
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (6)

MEDIUMFilesystem / path · fs.system_paths · CWE-22, CWE-59
Dockerfile:15
ENV PATH="/root/.local/bin/:$PATH"
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
server.py:97
url = f"http://127.0.0.1:{mcp_port}/mcp"
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
reset_state
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
MEDIUMAuth / authz · mcp.remote_no_auth · CWE-287, CWE-862
streamable-http
Why it matters. a network transport with no auth environment variable found
Fix. require a token
INFOInventory / provenance · inv.oversize · CWE-1104
.github/logo.png
.github/logo.png
Why it matters. 1217866 bytes not read
INFOSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.md:30
- **Curl** : `curl -LsSf https://astral.sh/uv/install.sh | sh`

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 94c8d79b8512full audit observations/trust-audit/mcp-server/sdiehl__sympy.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-0794c8d79b8512CAUTIONB89first audit
06

Questions

What is the SymPy MCP server?

A MCP server for symbolic manipulation of mathematical expressions

What tools does SymPy expose?

32 in total: 26 read-only, 5 that write, and 1 that can delete or overwrite (reset_state). Every one is listed on this page with its risk.

Is SymPy safe to connect to an agent?

With care. The audit graded it B (89/100) and found 6 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does SymPy need?

No credential environment variables were found in its source, so it appears to need none.

How does SymPy run?

It speaks streamable-http, so it runs as a service you connect to over the network. It is published on PyPI as sympy-mcp.

How current is this page?

The grade is for one exact copy of the source (94c8d79b8512), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement