MCP Calculate Server

MCP Calculate Server

A mathematical computation service that enables users to perform symbolic calculations including basic arithmetic, algebra, calculus, equation solving, and matrix operations through the MCP protocol.

611711Dark

Research & Data
Visit Server

Tools

calculate_expression

calculate mathematical expressions using the `sympify` function from `sympy`, parse and compute the input mathematical expression string, supports direct calls to SymPy functions (automatically recognizes x, y, z as symbolic variables) Parameters: expression (str): Mathematical expression, e.g., "223 - 344 * 6" or "sin(pi/2) + log(10)".Replace special symbols with approximate values, e.g., pi → 3.1415" Example expressions: "2 + 3*5" # Basic arithmetic → 17 "expand((x + 1)**2)" # Expand → x² + 2x + 1 "diff(sin(x), x)" # Derivative → cos(x) "integrate(exp(x), (x, 0, 1))" # Definite integral → E - 1 "solve(x**2 - 4, x)" # Solve equation → [-2, 2] "limit(tan(x)/x, x, 0)" # Limit → 1 "Sum(k, (k, 1, 10)).doit()" # Summation → 55 "Matrix([[1, 2], [3, 4]]).inv()" # Matrix inverse → [[-2, 1], [3/2, -1/2]] "simplify((x**2 - 1)/(x + 1))" # Simplify → x - 1 "factor(x**2 - 2*x - 15)" # Factorize → (x - 5)(x + 3) "series(cos(x), x, 0, 4)" # Taylor series → 1 - x²/2 + x⁴/24 + O(x⁴) "integrate(exp(-x**2)*sin(x), (x, -oo, oo))" # Complex integral "solve([x**2 + y**2 - 1, x + y - 1], [x, y])" # Solve system of equations "Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]).eigenvals()" # Matrix eigenvalues Returns: str: Calculation result. If the expression cannot be parsed or computed, returns an error message (str).

README

MCP Calculate Server

smithery badge

A mathematical calculation service based on MCP protocol and SymPy library, providing powerful symbolic computation capabilities.

Key Features

  • Basic Operations: Addition, subtraction, multiplication, division, exponentiation
  • Algebraic Operations: Expression expansion, factorization, simplification
  • Calculus: Differentiation, integration (definite/indefinite), limit calculation
  • Equation Solving: Algebraic equations, systems of equations
  • Matrix Operations: Matrix inversion, eigenvalues/eigenvectors calculation
  • Series Expansion: Taylor series expansion
  • Special Functions: Trigonometric, logarithmic, exponential functions

Usage Examples

# Basic operations
"2 + 3*5"17

# Algebraic operations
"expand((x + 1)**2)" → x² + 2x + 1
"factor(x**2 - 2*x - 15)" → (x - 5)(x + 3)

# Calculus
"diff(sin(x), x)" → cos(x)
"integrate(exp(x), (x, 0, 1))" → E - 1
"limit(tan(x)/x, x, 0)"1

# Equation solving
"solve(x**2 - 4, x)" → [-2, 2]
"solve([x**2 + y**2 - 1, x + y - 1], [x, y])" → [(0, 1), (1, 0)]

# Matrix operations
"Matrix([[1, 2], [3, 4]]).inv()" → [[-2, 1], [3/2, -1/2]]
"Matrix([[1, 2, 3], [4, 5, 6]]).eigenvals()" → {9/2 - sqrt(33)/2: 1, 9/2 + sqrt(33)/2: 1}

Installation

Installing via Smithery

To install Calculate Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @611711Dark/mcp_sympy_calculate_server --client claude

Local Installation

  1. Clone repository:

    git clone https://github.com/611711Dark/mcp-calculate-server.git
    cd mcp-calculate-server
    
  2. Create virtual environment and install dependencies:

    uv venv
    source .venv/bin/activate
    uv pip install -e .
    
  3. Configuration:

    "calculate_expression1": {
       "isActive": false,
       "command": "uv",
       "args": [
         "run",
         "--directory",
         "/path/to/mcp_calculate_server",
         "server.py"
       ],
     }
    

API Usage

Call calculate_expression tool via MCP protocol by passing mathematical expression string, returns computation result.

Dependencies

  • mcp>=1.5.0
  • sympy>=1.13.3
  • fastapi>=0.95.0
  • uvicorn>=0.21.0

License

This project is licensed under MIT License. See LICENSE file.

中文版本

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python