mcp-sympy
MCP server that exposes SymPy's symbolic mathematics functionality
Install
pip install mcp-sympy
MCP Server
mcp-name: io.github.daedalus/mcp-sympy
Usage
As MCP Server
Configure in your MCP client:
{
"mcpServers": {
"mcp-sympy": {
"command": "mcp-sympy",
"env": {}
}
}
}
Python API
from mcp_sympy import tools
# Simplify expressions
result = tools.sympy_simplify("sin(x)**2 + cos(x)**2")
print(result) # "1"
# Solve equations
result = tools.sympy_solve("x**2 - 4", "x")
print(result) # "[2, -2]"
# Differentiate
result = tools.sympy_diff("x**2", "x")
print(result) # "2*x"
# Integrate
result = tools.sympy_integrate("x**2", "x")
print(result) # "x**3/3"
# Create matrices
result = tools.sympy_matrix("1,2; 3,4")
print(result) # "Matrix([[1, 2], [3, 4]])"
# Number theory
result = tools.sympy_isprime("7")
print(result) # "True"
Available Tools
The MCP server exposes comprehensive SymPy functionality including:
- Symbolic Expressions: symbols, sympify, simplify, expand, factor
- Calculus: diff, integrate, limit, series, Derivative, Integral
- Solving: solve, solveset, nsolve, diophantine, dsolve
- Matrices: Matrix operations, inverse, determinant, eigenvalues
- Trigonometry: sin, cos, tan, and their inverses
- Special Functions: gamma, zeta, erf, fibonacci, etc.
- Number Theory: isprime, prime, gcd, lcm, totient
- Sets: FiniteSet, Interval, Union, Intersection
- Logic: And, Or, Not, Xor
- Printing: LaTeX, MathML, Python code
Development
git clone https://github.com/daedalus/mcp-sympy.git
cd mcp-sympy
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
License
MIT License - see LICENSE file.
Release files for mcp-sympy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_sympy-0.1.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_sympy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / mcp_sympy-0.1.0.tar.gz
| Download URL | mcp_sympy-0.1.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52b463351a04922f4073ac1180b45bf3583a0ff78ac3eea54b43ba2f77614511
|
|
BLAKE2b-256 checksum How to use checksums |
fccd20c551d13deb379e19860f026c34b335b12387187eed56298e5f873a64f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logRelease files / mcp_sympy-0.1.0-py3-none-any.whl
| Download URL | mcp_sympy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d6bb5218b6c2765b42601c536a93d80ace148b547869fe7329a5527449c6e7e
|
|
BLAKE2b-256 checksum How to use checksums |
d444bd7b1429483996971f2249e4dc6c59b7f968a0cfd090321406da7689683b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency log