Skip to main content

MCP server that exposes SymPy's symbolic mathematics functionality

Project description

mcp-sympy

MCP server that exposes SymPy's symbolic mathematics functionality

PyPI Python Coverage Ruff

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_sympy-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_sympy-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_sympy-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_sympy-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_sympy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52b463351a04922f4073ac1180b45bf3583a0ff78ac3eea54b43ba2f77614511
MD5 300c568b141c0cc90f62908c81d655d7
BLAKE2b-256 fccd20c551d13deb379e19860f026c34b335b12387187eed56298e5f873a64f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_sympy-0.1.0.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp-sympy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_sympy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_sympy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_sympy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d6bb5218b6c2765b42601c536a93d80ace148b547869fe7329a5527449c6e7e
MD5 06f2e382b53712414efbb086421ae617
BLAKE2b-256 d444bd7b1429483996971f2249e4dc6c59b7f968a0cfd090321406da7689683b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_sympy-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp-sympy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page