MCP Catalogs
Home

sympy-mcp

by sdiehl·70·Score 48

A Model Context Protocol server that exposes SymPy's symbolic mathematics capabilities through MCP tool calling for LLMs.

ai-llmdeveloper-toolsother
13
Forks
2
Open issues
2 mo ago
Last commit
2d ago
Indexed

Overview

Sympy-MCP is a comprehensive MCP server that provides LLMs with access to powerful symbolic mathematics capabilities through the Model Context Protocol. It exposes numerous SymPy tools for manipulating mathematical expressions, solving equations, performing calculus operations, and even handling advanced topics like tensor calculus for general relativity. The server bridges the gap between LLMs and specialized computer algebra systems, enabling accurate symbolic manipulation without the hallucination issues that typically affect language models with mathematical operations.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Solving differential equations in physics and engineering contexts
you:Performing symbolic integration and differentiation in educational settings
you:Computing tensors for general relativity calculations
you:What mathematical operations are supported by this MCP server?
you:Can this server handle general relativity calculations?

When to choose this

Choose this server when you need precise symbolic mathematics calculations and want to leverage LLMs for orchestrating mathematical workflows without risking hallucinations in mathematical operations.

When NOT to choose this

Don't choose this server if you need numerical computation rather than symbolic manipulation, or if you're working in an environment where Python/uv package management is not feasible.

Tools this server exposes

12 tools extracted from the README
  • intro

    Introduces a variable with specified assumptions and stores it

  • intro_many

    Introduces multiple variables with specified assumptions simultaneously

  • introduce_expression

    Parses an expression string using available local variables and stores it

  • solve_algebraically

    Solves an equation algebraically for a given variable over a given domain

  • dsolve_ode

    Solves an ordinary differential equation

  • integrate_expression

    Integrates an expression with respect to a variable

  • differentiate_expression

    Differentiates an expression with respect to a variable

  • simplify_expression

    Simplifies a mathematical expression using SymPy's canonicalize function

  • create_matrix

    Creates a SymPy matrix from the provided data

  • matrix_determinant

    Calculates the determinant of a matrix

  • calculate_tensor

    Calculates tensors from a metric (Ricci, Einstein, Weyl tensors)

  • create_predefined_metric

    Creates a predefined spacetime metric (e.g. Schwarzschild, Kerr, Minkowski)

Comparable tools

mathics-mcpsage-mcpmaxima-mcpsymbolic-math-mcp

Installation

  1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) first.
# 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

For Claude Desktop configuration:

{
  "mcpServers": {
    "sympy-mcp": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--with",
        "einsteinpy",
        "--with",
        "mcp[cli]",
        "--with",
        "pydantic",
        "--with",
        "sympy",
        "mcp",
        "run",
        "/ABSOLUTE_PATH_TO_SYMPY_MCP/server.py"
      ]
    }
  }
}

FAQ

What mathematical operations are supported by this MCP server?
The server supports algebraic equation solving, integration and differentiation, vector calculus, tensor calculus for general relativity, both ordinary and partial differential equations, matrix operations, unit conversions, and more.
Can this server handle general relativity calculations?
Yes, it can compute tensors from metrics (Ricci, Einstein, Weyl tensors) and includes predefined spacetime metrics like Schwarzschild, Kerr, and Minkowski. For general relativity calculations, you need to install the einsteinpy library.

Compare sympy-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.