Back to Directory/Developer Tools

io.github.daedalus/mcp-sympy

MCP server that exposes SymPy's symbolic mathematics functionality

Developer ToolsPythonv0.1.0

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.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
uvx mcp-sympy

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-daedalus-mcp-sympy": {
      "command": "uvx",
      "args": [
        "mcp-sympy"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

mcp-sympypypi

Compatible MCP Clients

io.github.daedalus/mcp-sympy works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More