Skip to main content
Glama
Michaelndegwa1

Calculator MCP Server

Calculator MCP Server (Python)

Ein funktionsreicher Model Context Protocol (MCP)-Server für mathematische Berechnungen, wissenschaftliche Funktionen, Einheitenumrechnungen, Finanzkennzahlen und statistische Analysen.

Erstellt mit Python 3.10+, dem offiziellen mcp SDK (FastMCP) und sympy. Unterstützt sowohl stdio (Claude Desktop) als auch sse (Claude Web / Remote-HTTP-Connectors) als Übertragungsmodi.


🚀 Funktionen & bereitgestellte Tools

  • evaluate_math_expression: Wertet benutzerdefinierte mathematische Ausdrücke sicher mit SymPy aus (z. B. 2 * (3 + 4), sqrt(144) + sin(pi / 2), log(100, 10), 5^3).

  • perform_arithmetic: Grundrechenarten (add, subtract, multiply, divide) auf Zahlenarrays.

  • scientific_calculation: Potenzen, Wurzeln (sqrt, cbrt), Fakultäten, Logarithmen (log, ln) und trigonometrische Funktionen (sin, cos, tan).

  • convert_unit: Umrechnung physikalischer Einheiten (Länge, Masse/Gewicht, Temperatur, Volumen, Zeit).

  • financial_calculator: Einfache Zinsen, Zinseszins, Darlehens-EMI-Berechnungen und Prozentsätze.

  • calculate_statistics: Zusammenfassende Statistiken (mean, median, mode, variance, stdev, summary).


Related MCP server: MCP Mathematics

📦 Installation & Einrichtung

  1. Abhängigkeiten installieren:

    pip install -r requirements.txt
    pip install -e .
  2. Automatisierte Unit-Tests ausführen:

    pytest

💻 1. Verbinden mit Claude Desktop (Stdio-Modus)

Ihre claude_desktop_config.json wurde automatisch erstellt unter: C:\Users\ADMIN\AppData\Roaming\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "calculator": {
      "command": "C:\\Users\\ADMIN\\AppData\\Local\\Programs\\Python\\Python312\\python.exe",
      "args": [
        "-m",
        "calculator_mcp.server"
      ],
      "env": {
        "PYTHONPATH": "E:/mcp tutorials"
      }
    }
  }
}

Verwendung in Claude Desktop:

  1. Claude Desktop vollständig beenden und neu starten.

  2. Öffnen Sie einen Chat und suchen Sie nach dem 🔨 (Hammer/Werkzeuge-Symbol) unten rechts in der Nachrichtenleiste.

  3. Fragen Sie Claude: "Was ist sqrt(144) + sin(pi / 2)?" oder "Rechne 100 degC in degF um".


🌐 2. Verbinden mit Claude Web & Remote-Web-Clients (SSE-HTTP-Modus)

Um den Calculator MCP als Web-HTTP-Dienst auszuführen (für webbasierte Plattformen, Web-Connectors oder Remote-KI-Agenten):

  1. SSE-Webserver starten:

    python -m calculator_mcp.server --transport sse --port 8000
  2. Web-Client-Konfiguration:

    {
      "mcpServers": {
        "calculator-web": {
          "serverUrl": "http://localhost:8000/sse"
        }
      }
    }
  3. Öffentliches Tunneling für Remote-Web-Apps (optional): Wenn Ihr Web-Client (z. B. ein entferntes Claude Web) außerhalb Ihres lokalen Netzwerks gehostet wird, machen Sie Port 8000 mit ngrok oder localtunnel öffentlich zugänglich:

    npx localtunnel --port 8000
    # Or using ngrok:
    ngrok http 8000

    Verwenden Sie dann die generierte öffentliche HTTPS-URL: https://<your-subdomain>.loca.lt/sse in Ihrer Web-MCP-Connector-Konfiguration.


🔍 Interaktives Testen über die Webschnittstelle (MCP Inspector)

Sie können die offizielle interaktive Web-Inspector-UI des Model Context Protocol starten, um alle Tools visuell in Ihrem Browser zu testen:

mcp dev calculator_mcp/server.py

Oder über Node:

npx @modelcontextprotocol/inspector@0.4.1 python -m calculator_mcp.server
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    A comprehensive MCP server that enables file operations, mathematical calculations with unit conversions, and system information retrieval. Provides secure access to local file system, calculator functions with statistics, and system monitoring capabilities.
    7
    ISC
  • A
    license
    C
    quality
    C
    maintenance
    A comprehensive MCP server that turns any AI assistant into a powerful mathematical computation engine, providing 52 advanced functions, 158 unit conversions, financial calculations, and secure AST-based evaluation.
    18
    13
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A comprehensive MCP server providing basic and advanced math operations (addition, subtraction, statistics, etc.) as well as smart prompts for multiplication tables, equation solving, financial calculations, geometry, unit conversion, loan amortization, probability, and fitness analytics.
    1

View all related MCP servers

Related MCP Connectors

  • This MCP server enables users to perform scientific computations regarding linear algebra and vect…

  • Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace

  • Hosted MCP server for business-day math, deadline planning, meeting overlap, and SLA calculations.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Michaelndegwa1/mcp-tutorials'

If you have feedback or need assistance with the MCP directory API, please join our Discord server