611711dark_mcp_calculate_server

611711dark_mcp_calculate_server

by 611711Dark
A server providing symbolic mathematical computation capabilities using the MCP protocol and SymPy library.

Mathematical Calculation Server with MCP Protocol

A powerful mathematical calculation service built on the MCP protocol and SymPy library, offering advanced symbolic computation capabilities.

Overview

The MCP Calculate Server is designed to handle a wide range of mathematical operations, from basic arithmetic to complex calculus and matrix operations. It leverages the SymPy library for symbolic mathematics and provides a seamless interface via the MCP protocol.

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

Local Installation

  1. Clone the repository:

shell git clone https://github.com/611711Dark/mcp-calculate-server.git cd mcp-calculate-server

  1. Create a virtual environment and install dependencies:

shell uv venv source .venv/bin/activate uv pip install -e .

  1. Configuration:

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

API Usage

Call the calculate_expression tool via the MCP protocol by passing a mathematical expression string. The server returns the 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 the MIT License. See the LICENSE file for details.

中文版本

Features & Capabilities

Categories
mcp_server model_context_protocol python sympy mathematical_computation api_integration fastapi uvicorn

Implementation Details

Stats

0 Views
0 Favorites
1 GitHub Stars

Repository Info

611711Dark Organization

Similar Servers

continuedev_continue by continuedev
0
0
0